#15094: Convert STATICFILES_DIRS into a tuple if set as string -----------------------------------+---------------------------------------- Reporter: oxy | Owner: nobody Status: closed | Milestone: Component: Contrib apps | Version: SVN Resolution: wontfix | Keywords: Stage: Unreviewed | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -----------------------------------+---------------------------------------- Comment (by lukeplant):
Automagically fixing these settings, the way that INSTALLED_APPS and TEMPLATE_DIRS does, is a bad idea IMO. Validation that throws an exception is acceptable, but automatically fixing like that only leads to further confusion, and leads to other code having to make the same fixes so that it can cope with everything that Django copes with. This often shows up with backwards compatibility or interop concerns. In this case, there will be confusion over why switching from a string to a tuple pair causes breakage. To give a different example, the mess in http://code.djangoproject.com/browser/django/trunk/django/views/decorators/cache.py#L11 was caused by requiring backwards compatibility with code that gave the 'convenience' of being able to do these: {{{ #!python @cache_page def foo(request): ... # or foo = cache_page(foo) # or @cache_page(123) def foo(request): ... # or foo = cache_page(foo, 123) }}} instead of the slightly uglier but consistent: {{{ #!python @cache_page() def foo(request): ... # or foo = cache_page()(foo) # or @cache_page(123) def foo(request): ... # or foo = cache_page(123)(foo) }}} I'd be strongly in favour of changing the INSTALLED_APPS handling to raise a `ConfigurationError` instead, but that might require a deprecation path. -- Ticket URL: <http://code.djangoproject.com/ticket/15094#comment:3> Django <http://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.