On Fri, Jun 21, 2013 at 12:38 PM, <piir...@gmail.com> wrote: > > I don't really want the settings to be adjusted at runtime, I would like my > application to reset some django "core" settings like the MIDDLEWARE_CLASSES > during the project configuration, once for all. > It is just to ease the deployment of the project and because the > applications knows which settings it needs. > > But if as you said settings are immutable then I'm doing it wrong, a > management command would be a better place to do this settings. >
Settings should be immutable outside of settings. That is to say, you can do anything - ANYTHING - you want to do in your project settings file, but you should not change settings from outside that file. django.confg.settings are imported from your project's settings file, so whatever you want to change should happen in there. This would mean your settings will be determined once at run time, when the server starts up. If you don't care about changing settings at run time, and these decisions are only made once, when you deploy the box, use buildout or any of the many other deployment management tools. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.