#16720: staticfiles_urlpatterns looks for files in MEDIA_ROOT, not STATIC_ROOT -------------------------------------+------------------------------------- Reporter: dramon@… | Owner: nobody Type: Bug | Status: new Milestone: | Component: contrib.staticfiles Version: 1.3 | Severity: Normal Keywords: staticfiles STATIC_ROOT | Triage Stage: Unreviewed Has patch: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+------------------------------------- {{{ In new project I set this: MEDIA_ROOT = '/someprj/media/' MEDIA_URL = '/media/' STATIC_ROOT = '/someprj/static/' STATIC_URL = '/static/' STATICFILES_FINDERS = ( # 'django.contrib.staticfiles.finders.FileSystemFinder', # 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'django.contrib.staticfiles.finders.DefaultStorageFinder', )
In urls.py I added at the end: urlpatterns += staticfiles_urlpatterns() In directory /someprj/static/ exists file test.txt When I try to access this file on http://localhost:8000/static/test.txt error page is returned. When a copy this file to /someprj/media/, Django shows it. }}} -- Ticket URL: <https://code.djangoproject.com/ticket/16720> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.