Tuesday, May 15, 2012

Can't locate 'media' directory

Hi,

I attempted to add 'media' directory to the root of my project and placed a css file and some ajax javascript. The server runtime is unable to locate it. Can someone help?

I have the following in settings.py

MEDIA_ROOT = os.path.join(ROOT_PATH, 'media')
MEDIA_URL = 'http://127.0.0.1:8000/media/'

The console error I get is:

C:\dev\Projects\ajax_tut\ajax_tut>python ../manage.py runserver
Validating models...
0 errors found
Django version 1.4, using settings 'ajax_tut.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[15/May/2012 19:11:12] "GET / HTTP/1.1" 200 613
[15/May/2012 19:11:12] "GET /media/style.css HTTP/1.1" 404 2312
[15/May/2012 19:11:12] "GET /media/jquery-1.2.6.min.js HTTP/1.1" 404 2342
[15/May/2012 19:11:28] "GET / HTTP/1.1" 200 613
[15/May/2012 19:11:28] "GET /media/style.css HTTP/1.1" 404 2312
[15/May/2012 19:11:28] "GET /media/jquery-1.2.6.min.js HTTP/1.1" 404 2342

Where do I place this directory and what do I set in settings.py and which directory do I launch the server? Once again, any help would be much appreciated.

Thanks,


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/XyZWqGOd6KoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate