I had my static files being served form media i.e., the tree looked
like this:
media/
/css
/js
/images
with this in my url conf:
if settings.SERVE_MEDIA_FROM_DJANGO:
urlpatterns += patterns('',
(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': r'media'}),
(r'^tiny_mce/(?P<path>.*)$', 'django.views.static.serve',
{ 'document_root': r'media/js/tiny_mc' }),
)
I then switched it to this:
static/
/css
/js
/images
with this in my url conf:
if settings.SERVE_MEDIA_FROM_DJANGO:
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': r'static'}),
(r'^tiny_mce/(?P<path>.*)$', 'django.views.static.serve',
{ 'document_root': r'static/js/tiny_mc' }),
)
I don't understand why changing media to static has stopped django
from serving static files, any ideas?
Cheers,
J
--
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.