The global settings file is the single biggest hurdle, not only in django deployment, but also development. And it's been like this since I can first remember with no visible progress.<p>It sucks to keep track of dev/prod local files, it makes it hard to setup a simple script inside of a django environment, it makes multi tenant apps unnecessarily complex, app developers usually want to shove every single configuration option inside of it...<p>If anyone with more than a few hours of django development is doing split settings or something more complex, and even the official docs and best practices recommend doing so, why are we still stuck with it?<p>There are much saner ways to deal with configuration: Flask's[1] is one nice way, as is Padrino's[2].<p>As a Django dev, this is one of those things that actually makes me jealous of Rails, where the core devs are not afraid of breaking backwards compatibility for sanity's sake.<p>In my opinion it should be priority #1 for an overhaul.<p>[1] <a href="http://flask.pocoo.org/docs/config/" rel="nofollow">http://flask.pocoo.org/docs/config/</a>
[2] <a href="http://www.padrinorb.com/guides/mounting-applications" rel="nofollow">http://www.padrinorb.com/guides/mounting-applications</a>
I've been doing roughly this for a little while now, and it works pretty well. Particularly the bit about splitting the settings file. There are a few ways to do that, here[1].<p>[1] <a href="https://code.djangoproject.com/wiki/SplitSettings" rel="nofollow">https://code.djangoproject.com/wiki/SplitSettings</a>
At Mozilla, we use a homegrown template called Playdoh[1][2] that includes split settings file, some sample deployment scripts, and lots of useful libraries that handle stuff like secure cookies, localization, strong password hashing, etc.<p>I'm not super-familiar with our deployment process, but I do know that we have internal git repos that hold our production and dev environments (like local settings) and use puppet for setting up servers.<p>[1]: Github: <a href="https://github.com/mozilla/playdoh" rel="nofollow">https://github.com/mozilla/playdoh</a><p>[2]: Docs: <a href="http://playdoh.readthedocs.org/en/latest/index.html" rel="nofollow">http://playdoh.readthedocs.org/en/latest/index.html</a>
I am learning django/web development, and will likely be launching my app in the wild soon. A link that details out how to manage deployment and source code management using git would be tremendously helpful.
We manage the deployments of our Django application, in multiple environments (production/staging/experimental/development) using Buildout. It probably is quite difficult to learn at first, but very rewarding once you get the hang of it.
Deployment is all about being confident. And the confidence that Buildout has given us, is uncomparable to anything else.<p>A cool way to produce various settings/configurations, is using the Buildout recipe collective.recipe.genshi. This enables us to create settings based on templates, using buildout configuration parameters. Very flexible solution!