2 ms·
This is far from perfect. Using old style DATABASE settings. Questions article's up to dateness and author's knowledge. Importing local_settings into settings
by njharman 16y ago
This is far from perfect.
Using old style DATABASE settings. Questions article's up to dateness and author's knowledge.
Importing local_settings into settings like that means it's hard for local settings to add to the various lists e.g. installed apps, middleware. It's far more flexible to import a base_settings.py into settings.py (which is the local settings file).
OA's templete thing is (if I understood it correctly) total fail. Learn about django.template.loaders.app_directories.Loader
Debug status based on domain name is not scalable, prone to error and annoying (I often need to switch debug on/off in dev/staging/production(pre-launch))
- jsdalton 16y agoI agree with some of your comments, but to be fair this was posted in October 2009, so it's almost one year old. If I'm not mistaken, the new dictionary-style DATABASES setting is from 1.2, which only came out this year. Not sure I agree about your comment regrading settings. It's quite easy to amend values from the main settings instead of overwriting them, you just do e.g. from settings import INSTALLED_APPS, then INSTALLED_APPS += ( ... ). That said, I've found the approach to settings outline here: http://blog.zacharyvoase.com/2010/02/03/django-project-conventions/ http://blog.zacharyvoase.com/2010/02/03/django-project-conve... to be quite intriguing and have been meaning to investigate it and possibly start using it.