Hi, On Wednesday, January 2, 2013 8:19:36 PM UTC+1, ted wrote: > > FWIW, this is a working draft of a default settings file I like that > addresses most of these issues: > https://github.com/tedtieken/django-project-skel/blob/master/project_name/settings.py > (would appreciate constructive criticism offline)
Luckily you can already use that due to --template support for startproject, but here a few comments (Aside from still being violently -1 on it): * local_settings is imo a bad pattern as they can't easily override anything without copying it completely into the local_settings (think of all the settings which are dicts like DATABASES and CACHES) * Where does LOCAL_SETTINGS come from, are you supposed to set that in your settings file to get locale_settings imported? Why, if local_settings are there I want them imported, that is the point of local_settings. * All the env configuration stuff is just scary and way to specific for a useful default settings file * You have way to much stuff in INSTALLED_APPS, most of it is completely out of scope for a default settings file. * that applib sys.path magic just makes me cry. That all said, it's nice if that settings file fits you, but I surely couldn't do anything with it. This is probably how I would do it (Talking about a big monolithic project): project/default_settings.py test_settings.py dev_settings.py production_settings.py then each of the settings files would do: "from project.default_settings import *" and then customize stuff as needed (eg: INSTALLED_APPS += ('debug_toolbar',)). This way all the settings files are clearly separated and stay readable. Might not be best practices but that's how it works quite well for me. Cheers, Florian -- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/A9l9wk8xT40J. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.