How do I print out the contents of my settings in a django shell?

后端 未结 5 1002
不思量自难忘°
不思量自难忘° 2021-01-30 12:41

When I run python manage.py shell, I can print out the python path

>>> import sys
>>> sys.path

What should I typ

5条回答
  •  生来不讨喜
    2021-01-30 13:40

    In your shell, you can call Django's built-in diffsettings:

    from django.core.management.commands import diffsettings
    
    output = diffsettings.Command().handle(default=None, output="hash", all=False)
    
    

提交回复
热议问题