Purgeable / full-app

Keep all functionality for (parsers + db + frontend API) inside one Django project.
0 stars 1 forks source link

settings: branch production/local/other settings #13

Closed epogrebnyak closed 6 years ago

epogrebnyak commented 7 years ago

I think we need settings branching as in https://stackoverflow.com/questions/1626326/how-to-manage-local-vs-production-settings-in-django/15325966#15325966

I see there are two ways to achive switching .py fiels in settings directory or yaml config files. I slightly favour .py.

Follows #5

epogrebnyak commented 7 years ago

@tinivir - where are we on this? should we do it now or later?

Rub4ek commented 7 years ago

Also, check this package: https://django-configurations.readthedocs.io/en/stable/

It helps to keep settings more "dry"

from configurations import Configuration

class Base(Configuration):
    TIME_ZONE = 'Europe/Berlin'

class Dev(Base):
    DEBUG = True
    TEMPLATE_DEBUG = DEBUG

class Prod(Base):
    TIME_ZONE = 'America/New_York'
epogrebnyak commented 7 years ago

@Rub4ek - thanks will try to integrate this.

epogrebnyak commented 7 years ago

Usually do we need a local and a production setting? Just two?

Rub4ek commented 7 years ago

@epogrebnyak how about test settings?

epogrebnyak commented 7 years ago

Right!

23 сент. 2017 г. 21:39 пользователь "Rub4ek" notifications@github.com написал:

@epogrebnyak https://github.com/epogrebnyak how about test settings

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mini-kep/full-app/issues/13#issuecomment-331661776, or mute the thread https://github.com/notifications/unsubscribe-auth/AI1grhfD0nmzgf2LMwpi0VywDV2klJLOks5slVBKgaJpZM4PfOcx .