How to manage local vs production settings in Django?

前端 未结 22 1884
别跟我提以往
别跟我提以往 2020-11-22 15:00

What is the recommended way of handling settings for local development and the production server? Some of them (like constants, etc) can be changed/accessed in both, but s

22条回答
  •  渐次进展
    2020-11-22 15:09

    There is also Django Classy Settings. I personally am a big fan of it. It's built by one of the most active people on the Django IRC. You would use environment vars to set things.

    http://django-classy-settings.readthedocs.io/en/latest/

提交回复
热议问题