[BangPypers] Maintaining dev and prod env alike

Noufal Ibrahim noufal at nibrahim.net.in
Sun Mar 25 13:31:25 CEST 2012


kracethekingmaker <kracethekingmaker at gmail.com> writes:

> hi
>>> Hi
>>>
>>>   I am using git. I do dev in my localhost and prod env is my web
>>> server, I don't have test env. My issue is my model has db params, so
>>> param are different in both env, so every time I pull and change db
>>> param, I dont think so this is encouraged, though this has nothing to
>>> do with python, but most people out here must have faced similar
>>> situation, kindly let me know best practices.
>> You should probably keep a -dev settings file which can override the
>> server parameters (or vice versa). This shouldn be as small as possible
>> and should be ignored by git.
> Mean config.py ignored by git and have sample_config.py bare bone
> skeleton?

You can either have the the "main" one as the production one and have a
small ignored dev one which overrides some parts of the production one
or vice versa. 

Either way, make sure that your main config is version controlled and
that the ignored one is as small as possible.

-- 
~noufal
http://nibrahim.net.in

All generalisations are dangerous, including this one.


More information about the BangPypers mailing list