diff --git a/AUTHORS b/AUTHORS index f2578b6e06..52c710e1c3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -76,6 +76,7 @@ answer newbie questions, and generally made Django that much better: Luke Plant phaedo plisk + Oliver Rutherfurd David Schein sopel Radek Švarz diff --git a/django/bin/django-admin.py b/django/bin/django-admin.py index a30b038547..63c6307257 100755 --- a/django/bin/django-admin.py +++ b/django/bin/django-admin.py @@ -1,7 +1,7 @@ #!/usr/bin/env python from django.core import management from optparse import OptionParser -import os, sys +import os, sys, textwrap ACTION_MAPPING = { 'adminindex': management.get_admin_index, @@ -37,8 +37,10 @@ def get_usage(): available_actions.sort() for a in available_actions: func = ACTION_MAPPING[a] - usage.append(" %s %s -- %s" % (a, func.args, getattr(func, 'help_doc', func.__doc__))) - return '\n'.join(usage) + usage.append(" %s %s" % (a, func.args)) + usage.extend(textwrap.wrap(getattr(func, 'help_doc', func.__doc__), initial_indent=' ', subsequent_indent=' ')) + usage.append("") + return '\n'.join(usage[:-1]) # Cut off last list element, an empty space. class DjangoOptionParser(OptionParser): def print_usage_and_exit(self):