I am having some problems in figuring out the media path problem in django. In the settings.py file, I have ADMIN_MEDIA_PREFIX = '/media/admin/'. So certain css and js files like forms.css,RelatedObjectLookup.js files are having the path like this
/media/admin/js/admin/RelatedObjectLookup.js and /media/admin/css/forms.css.
There is not folder in my project like /media/admin. However when I run the server using manage.py script and browse the page, the above css and js files are being loaded. I can see that the files forms.css and RelatedObjectLookup.js are in the django itself. However, I am confused about the path in the django itself. It is something like this
/usr/local/lib/python2.7/site-packages/django/contrib/admin/media/js/calendar.js
So, I am confused, how are the files being fetched. In the server log I can see the GET request for other files but not for these files(forms.css and RelatedObjectLookup.js)
I have the following in myserver request log after running manage.py.
[23/Aug/2011 02:20:36] "GET /media/js/DateTimeShortcuts.js HTTP/1.1" 304 0
[23/Aug/2011 02:20:36] "GET /media/js/custom/new_appointment_new.js HTTP/1.1" 304 0
[23/Aug/2011 02:20:36] "GET /media/js/fancybox/jquery.mousewheel-3.0.4.pack.js HTTP/1.1" 304 0
[23/Aug/2011 02:20:36] "GET /media/js/fancybox/jquery.fancybox-1.3.4.pack.js HTTP/1.1" 304 0
[23/Aug/2011 02:20:36] "GET /media/js/fancybox/jquery.fancybox-1.3.4.css HTTP/1.1" 304 0
As you can there is no request for the forms.css and RelatedObjectLookup.js files.
Any suggestions?