How to make several configurations for the DJango project?
📁 пример, django, debug, проект
It is quite obvious that, for example, on production and when developing, the project configuration should be different. However, by default, Django provides for the use of the one-single settings.py , in which everything lies in a row, without any hints of separation. And I want to divide.
for example, when developing, you can tu on deBug = true and connect Debug Toolbar, which you can’t do it on production, use a specific local database of the developer, soften the restrictions, etc.
In addition, if you want to publish a Django project On some githab, then adding to the settings.py repository with all the passwords is not at all cool. And if you remove the passwords from there, commercial and retu the passwords back, then this is completely inconvenient, and you can accidentally forget it and notice settings.py with passwords. Yes, and conflicts will be.
how can you divide the configuration into different parts so that the parameters of the production, development parameters and passwords lay somehow separately from each other?
Ответов пока нет.
Войдите чтобы оставить ответ