Hi Thomas,
El 29/09/2014 10:05, "Thomas Güttler" <h...@tbz-pariv.de> escribió:
>
> Hi,
>
> of course we separate data from code:
>
> - code belongs into version control (git)
> - data belongs into a database (postgres)
>
> But where does configuration belong?
"To the environment"
A good practice is to place config in the environment[0] and load it from code.
pip install python-decouple
On your settings.py.
Import the config object:
from decouple import config
Retrieve the configuration parameters:
SECRET_KEY = config('SECRET_KEY') DEBUG = config('DEBUG', default=False, cast=bool) EMAIL_HOST = config('EMAIL_HOST', default='localhost') EMAIL_PORT = config('EMAIL_PORT', default=25, cast=int)
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f518e9ed-e22d-49d6-8f0f-5ef8981b6d88%40googlegroups.com.--
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...@googlegroups.com.
To post to this group, send email to django...@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/CANjJ3%3DMTW0euFcQiv3QPTV4oidHWay91uK7oviAU8_YF71CN4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
If you're not a programmer or sysadmin, it should be done in the
> database.
fab dev config:set,DEBUG,False
--
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...@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.
Wouldn't it be really cool if you could add an app by pressing a button?