Got it working by changing the following: STATIC_ROOT = '' STATIC_URL = '/static/' STATICFILES_DIRS = ( # Put strings here, like "/home/html/static" or "C:/www/django/ static". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. os.path.join(PROJECT_ROOT, 'static'), )
On Jul 8, 2:47 pm, neridaj <neri...@gmail.com> wrote: > I'm using Django version 1.3 and the Django devserver. My admin media > is the default: ADMIN_MEDIA_PREFIX = '/static/admin/' > > On Jul 8, 1:49 am, bruno desthuilliers <bruno.desthuilli...@gmail.com> > wrote: > > > > > > > > > On Jul 8, 4:40 am, neridaj <neri...@gmail.com> wrote: > > > > I had mystaticfiles 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 tostatichas stopped django > > > fromservingstaticfiles, any ideas? > > > settings.MEDIA_URL and MEDIA_ROOT ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.