How to manage local vs production settings in Django?

前端 未结 22 2109
别跟我提以往
别跟我提以往 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:15

    Making multiple versions of settings.py is an anti pattern for 12 Factor App methodology. use python-decouple or django-environ instead.

提交回复
热议问题