Ticket #17037: django_manage_py_printsettings.diff
File django_manage_py_printsettings.diff, 676 bytes (added by , 13 years ago) |
---|
-
django/core/management/commands/printsettings.py
1 from django.core.management.base import BaseCommand 2 from django.conf import settings 3 4 5 class 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))