staticfiles app seems forced upon me
|Reported by:||jcscoobyrs||Owned by:||jezdez|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I just updated my Django to the latest dev (14587) and I'm finding that the staticfiles app (django.contrib.staticfiles) seems to be forced upon me. Prior to updating, my Django app was serving static files in development mode the way the documentation suggested which used MEDIA_ROOT and MEDIA_URL. After I updated Django, I get the following:
0 errors found
Django version 1.3 alpha 1 SVN-14587, using settings 'singularity.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Unhandled exception in thread started by <bound method Command.inner_run of <django.core.management.commands.runserver.Command object at 0x10133c9d0>>
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/django/core/management/commands/runserver.py", line 83, in inner_run
handler = self.get_handler(*args, options)
File "/Library/Python/2.6/site-packages/django/core/management/commands/runserver.py", line 115, in get_handler
return AdminMediaHandler(handler, options.get('admin_media_path', ))
File "/Library/Python/2.6/site-packages/django/contrib/staticfiles/handlers.py", line 23, in init
File "/Library/Python/2.6/site-packages/django/contrib/staticfiles/utils.py", line 40, in check_settings
raise ImproperlyConfigured("The MEDIA_URL and STATICFILES_URL "
django.core.exceptions.ImproperlyConfigured: The MEDIA_URL and STATICFILES_URL settings must have individual values
Now...my settings.py wasn't updated to have the staticfiles app installed so I'm confused. Being a development version of Django, I go to the docs and I see serving static files is documented differently. I also see that the TEMPLATE_CONTEXT_PROCESSORS includes the staticfiles context processor by default. My first thought was to remove that by overriding the default for TEMPLATE_CONTEXT_PROCESSORS but I still get the error above. I don't mind using the staticfiles app but it shouldn't be forced upon me like it appears to have been. Existing Django apps shouldn't fail upon startup or there should at least be some documented way to completely turn off the new staticfiles app.
Change History (5)
comment:1 Changed 6 years ago by jcscoobyrs
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:3 Changed 6 years ago by jezdez
- milestone set to 1.3
- Owner changed from nobody to jezdez
- Status changed from new to assigned
- Triage Stage changed from Unreviewed to Accepted
comment:4 Changed 6 years ago by jezdez
- Resolution set to fixed
- Status changed from assigned to closed