On Monday, January 19, 2015 at 3:45:18 PM UTC+1, Andreas Kahnert wrote:
>
> I'm not talking about modifications inside the settings.py but in other 
> place. With lists, unexperienced devs might do things like: from 
> django.conf import settings; settings.TEMPLATE_DIRS[3] = '/my_tpls'; and 
> expect to work out good. 
>

And with tuples they just do settings.TEMPLATE_DIRS = 
list(settings.TEMPLATE_DIRS) followed by your example. What I am trying to 
say is that a developer ignoring the docs will always run into issues, no 
matter how hard we try to prevent it. 

This is realy just a question of logic: lists are mutable - settings are 
> immutable; see the conflict?
>

Well, what is your suggestion for the dictionaries in the settings then ;) 
In the end it just doesn't matter if it's a list or a tuple -- you can 
"mutate" it anyways. For the functionality of Django it makes no difference 
if you altered the setting in place or just replace it -- stuff __will__ 
break. 

Cheers,
Florian

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/4e7942e0-beac-4cdb-a129-b12f728e392d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to