Opened 10 years ago

Closed 10 years ago

#8240 closed (invalid)

settings no longer availiable in

Reported by: mackenzie@… Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


the edit of /django/core/management/ in [8282]
has made it so that settings are no longer available in a

MEDIA_ROOT = '/media/'

from django.conf.urls.defaults import *
from django.conf import settings

urlpatterns = patterns('',
    (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),

this setup will always give a 404 when you try to view the static media. It is not the view but settings.MEDIA_ROOT is not accessible. any of the settings can not be accessed.

Change History (1)

comment:1 Changed 10 years ago by Malcolm Tredinnick

Resolution: invalid
Status: newclosed

As noted on the mailing list, Karen Tracey has tried this exact example and it works. I just tried a completely unrelated project, imported settings into my url config and printed out settings.MEDIA_ROOT and it worked (using [8309]). So this doesn't seem to be a problem. I think there's something else going on at your end here.

Note: See TracTickets for help on using tickets.
Back to Top