在具体的Django应用中,通过引入 django.conf.settings 使用配置,例:
from django.conf import settings

settings.configure(DEBUG=True, TEMPLATE_DEBUG=True,
    TEMPLATE_DIRS=('/home/web-apps/myapp', '/home/web-apps/base'))

 

转自:http://django-chinese-docs-14.readthedocs.org/en/latest/topics/settings.html

 

相关文章:

  • 2021-12-15
  • 2021-10-03
  • 2021-06-05
  • 2021-07-29
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2021-04-16
  • 2021-12-21
  • 2022-12-23
  • 2023-04-04
相关资源
相似解决方案