Hi!
I am trying to setup django to use static files for development purposes.
I used http://docs.djangoproject.com/en/dev/howto/static-files/
But actually failed to serve anything :(
My urls.py
urlpatterns = patterns('django.views.generic.simple',
(r'','direct_to_template',{'template':'index.html'}),
)
if settings.DEBUG:
urlpatterns += patterns('',
(r'^media/(?P<path>.*)$','django.views.static.serve', {'\
document_root': '/Users/oleg/media/spilka/'}),
)
But needed media is not loaded, e.g.
`-- spilka
|-- css
| `-- styles.css
And http://127.0.0.1:8000/media/css/styles.css
gives Page not found:
/usr/local/lib/python2.5/site-packages/django/contrib/admin/media/css/styles.css
Thanks,
Oleg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---