Ticket #983: django-admin.diff

File django-admin.diff, 902 bytes (added by oliver@…, 19 years ago)
  • django/bin/django-admin.py

     
    11#!/usr/bin/env python
    22from django.core import management
    33from optparse import OptionParser
    4 import os, sys
     4import os, sys, textwrap
    55
    66ACTION_MAPPING = {
    77    'adminindex': management.get_admin_index,
     
    3737    available_actions.sort()
    3838    for a in available_actions:
    3939        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("")
    4143    return '\n'.join(usage)
    4244
    4345class DjangoOptionParser(OptionParser)
Back to Top