How do you configure Django for simple development and deployment?

后端 未结 14 1585
闹比i
闹比i 2020-11-30 16:14

I tend to use SQLite when doing Django development, but on a live server something more robust is often needed (MySQL/PostgreSQL, for example). Invariably, there are other c

14条回答
  •  清歌不尽
    2020-11-30 16:32

    At the end of settings.py I have the following:

    try:
        from settings_local import *
    except ImportError:
        pass
    

    This way if I want to override default settings I need to just put settings_local.py right next to settings.py.

提交回复
热议问题