Ticket #17037: django_manage_py_printsettings.diff

File django_manage_py_printsettings.diff, 676 bytes (added by msabramo, 3 years ago)

Patch to add printsettings management command

  • django/core/management/commands/printsettings.py

     
     1from django.core.management.base import BaseCommand
     2from django.conf import settings
     3
     4
     5class Command(BaseCommand):
     6    help = "Print the active Django settings"
     7
     8    def handle(self, *args, **options):
     9        for key in dir(settings):
     10            if key.startswith('__'):
     11                continue
     12
     13            value = getattr(settings, key)
     14            print('%-40s : %s' % (key, value))
Back to Top