Ticket #983: django-admin.diff
File django-admin.diff, 902 bytes (added by , 19 years ago) |
---|
-
django/bin/django-admin.py
1 1 #!/usr/bin/env python 2 2 from django.core import management 3 3 from optparse import OptionParser 4 import os, sys 4 import os, sys, textwrap 5 5 6 6 ACTION_MAPPING = { 7 7 'adminindex': management.get_admin_index, … … 37 37 available_actions.sort() 38 38 for a in available_actions: 39 39 func = ACTION_MAPPING[a] 40 usage.append(" %s %s -- %s" % (a, func.args, getattr(func, 'help_doc', func.__doc__))) 40 usage.append(" %s %s" % (a, func.args)) 41 usage.extend(textwrap.wrap(getattr(func, 'help_doc', func.__doc__), initial_indent=' ', subsequent_indent=' ')) 42 usage.append("") 41 43 return '\n'.join(usage) 42 44 43 45 class DjangoOptionParser(OptionParser)