Thursday, October 2, 2014

Re: Config: DB or git?

I like to handle things the way Heroku does.

1. Use fabric or ansible to define the machine configurations.
2. Use a .env file on remote server, where you can store the setting values, which can be loaded into django settings.

python-dotenv[1] is a nifty tool that works with fabric to manage your remote .env file. Changing a config value on a dev 
server can be as simple as:

fab dev config:set,DEBUG,False


​--​
Saurabh Kumar


On Thu, Oct 2, 2014 at 7:25 PM, Thomas Güttler <hv@tbz-pariv.de> wrote:


Am 02.10.2014 um 14:11 schrieb Tom Evans:
On Thu, Oct 2, 2014 at 12:21 PM, Thomas Güttler <hv@tbz-pariv.de> wrote:
Am 01.10.2014 um 14:56 schrieb Collin Anderson:

If you're a programmer or sysadmin, configuration should be done in files.
If you're not a programmer or sysadmin, it
should be done in the database.


Why do you look the person for a decision like this?

Wouldn't it be better to look at the data which gets configured here?

I love git like most programmers love their version control system.

But for most stuff config in DB is much better.

example: INSTALLED_APPS

Wouldn't it be really cool if you could add an app by pressing a button?


I have developed, maintained, managed and supported a generic ORM that
stores all details about how things are configured - models, fields,
classes, behaviours - in the DB for the past ten years, and I can tell
you that, no, it is not really cool, it is a massive pain in the
proverbial.

Yes, you are right. Storing the ORM models in DB is too much.

  Thomas

--
Thomas Güttler
http://thomas-guettler.de/

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/542D5946.8020706%40tbz-pariv.de.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFuL3sJSPXSTdNf4K2WUPGC8aywJzgv7YHEL4OHZrjiFyA_kTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment