Django - How to deal with the paths in settings.py on collaborative projects

后端 未结 5 1286
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-01 08:17

I have just started a feasibility study on Django for my company and I have noticed the need for absolute paths on settings.py:

TEMPLATE_DIRS = (
   # Put string         


        
5条回答
  •  北海茫月
    2021-02-01 09:00

    Besides using os.path you could add

    try:
        import * from settings_local
    except:
        pass
    

    at the end of you settings.py. Every developer can then create his own settings_local.py file which is not checked in into the VCS!

提交回复
热议问题