Archives par étiquette : anglais

Modular settings for Django

This is the first post in a series about useful methods to simplify the development and the installation of Django. In this specific post I’m proposing a way to organize the settings into a module.

I have been always bothered by the settings file because it is needed to change it everytime we go from development server to production server: one has mainly to change the database, the debug option and the static/media options. This prevents us to copy at one time all the files (or we have to change the settings file elsewhere, e.g. in and it is unnecessarily complicated; also versioning is harder because we do not want to let sensitive information (secret key, etc.) be on internet. So after some thoughts (and maybe some readings on the web I do not remember) I came to a solution to this problem. Continuer la lecture