Loading django/core/management/__init__.py +4 −4 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ def call_command(name, *args, **options): class ManagementUtility(object): """ Encapsulates the logic of the django-admin.py and manage.py utilities. Encapsulates the logic of the django-admin and manage.py utilities. A ManagementUtility has a number of commands, which can be manipulated by editing the self.commands dictionary. Loading Loading @@ -163,7 +163,7 @@ class ManagementUtility(object): """ Tries to fetch the given subcommand, printing a message with the appropriate command called from the command line (usually "django-admin.py" or "manage.py") if it can't be found. "django-admin" or "manage.py") if it can't be found. """ # Get commands outside of try block to prevent swallowing exceptions commands = get_commands() Loading Loading @@ -312,8 +312,8 @@ class ManagementUtility(object): sys.stdout.write(self.main_help_text() + '\n') else: self.fetch_command(options.args[0]).print_help(self.prog_name, options.args[0]) # Special-cases: We want 'django-admin.py --version' and # 'django-admin.py --help' to work, for backwards compatibility. # Special-cases: We want 'django-admin --version' and # 'django-admin --help' to work, for backwards compatibility. elif subcommand == 'version' or self.argv[1:] == ['--version']: sys.stdout.write(django.get_version() + '\n') elif self.argv[1:] in (['--help'], ['-h']): Loading django/core/management/base.py +3 −3 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ from __future__ import unicode_literals """ Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). be executed through ``django-admin`` or ``manage.py``). """ import os Loading Loading @@ -112,7 +112,7 @@ class BaseCommand(object): the command-parsing and -execution behavior, the normal flow works as follows: 1. ``django-admin.py`` or ``manage.py`` loads the command class 1. ``django-admin`` or ``manage.py`` loads the command class and calls its ``run_from_argv()`` method. 2. The ``run_from_argv()`` method calls ``create_parser()`` to get Loading Loading @@ -398,7 +398,7 @@ class BaseCommand(object): "(%s) and 'can_import_settings' (%s) command " "options." % (self.leave_locale_alone, self.can_import_settings)) # Switch to US English, because django-admin.py creates database # Switch to US English, because django-admin creates database # content like permissions, and those shouldn't contain any # translations. from django.utils import translation Loading django/core/management/commands/flush.py +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ Are you sure you want to do this? " * The database isn't running or isn't configured correctly.\n" " * At least one of the expected database tables doesn't exist.\n" " * The SQL was invalid.\n" "Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL this command wasn't able to run.\n" "Hint: Look at the output of 'django-admin sqlflush'. That's the SQL this command wasn't able to run.\n" "The full error: %s") % (connection.settings_dict['NAME'], e) six.reraise(CommandError, CommandError(new_msg), sys.exc_info()[2]) Loading django/core/management/commands/inspectdb.py +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ class Command(BaseCommand): yield "# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table" yield "# Feel free to rename the models, but don't rename db_table values or field names." yield "#" yield "# Also note: You'll have to insert the output of 'django-admin.py sqlcustom [app_label]'" yield "# Also note: You'll have to insert the output of 'django-admin sqlcustom [app_label]'" yield "# into your database." yield "from __future__ import unicode_literals" yield '' Loading docs/_ext/djangodocs.py +1 −1 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator): def parse_django_admin_node(env, sig, signode): command = sig.split(' ')[0] env._django_curr_admin_command = command title = "django-admin.py %s" % sig title = "django-admin %s" % sig signode += addnodes.desc_name(title, title) return sig Loading Loading
django/core/management/__init__.py +4 −4 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ def call_command(name, *args, **options): class ManagementUtility(object): """ Encapsulates the logic of the django-admin.py and manage.py utilities. Encapsulates the logic of the django-admin and manage.py utilities. A ManagementUtility has a number of commands, which can be manipulated by editing the self.commands dictionary. Loading Loading @@ -163,7 +163,7 @@ class ManagementUtility(object): """ Tries to fetch the given subcommand, printing a message with the appropriate command called from the command line (usually "django-admin.py" or "manage.py") if it can't be found. "django-admin" or "manage.py") if it can't be found. """ # Get commands outside of try block to prevent swallowing exceptions commands = get_commands() Loading Loading @@ -312,8 +312,8 @@ class ManagementUtility(object): sys.stdout.write(self.main_help_text() + '\n') else: self.fetch_command(options.args[0]).print_help(self.prog_name, options.args[0]) # Special-cases: We want 'django-admin.py --version' and # 'django-admin.py --help' to work, for backwards compatibility. # Special-cases: We want 'django-admin --version' and # 'django-admin --help' to work, for backwards compatibility. elif subcommand == 'version' or self.argv[1:] == ['--version']: sys.stdout.write(django.get_version() + '\n') elif self.argv[1:] in (['--help'], ['-h']): Loading
django/core/management/base.py +3 −3 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ from __future__ import unicode_literals """ Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). be executed through ``django-admin`` or ``manage.py``). """ import os Loading Loading @@ -112,7 +112,7 @@ class BaseCommand(object): the command-parsing and -execution behavior, the normal flow works as follows: 1. ``django-admin.py`` or ``manage.py`` loads the command class 1. ``django-admin`` or ``manage.py`` loads the command class and calls its ``run_from_argv()`` method. 2. The ``run_from_argv()`` method calls ``create_parser()`` to get Loading Loading @@ -398,7 +398,7 @@ class BaseCommand(object): "(%s) and 'can_import_settings' (%s) command " "options." % (self.leave_locale_alone, self.can_import_settings)) # Switch to US English, because django-admin.py creates database # Switch to US English, because django-admin creates database # content like permissions, and those shouldn't contain any # translations. from django.utils import translation Loading
django/core/management/commands/flush.py +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ Are you sure you want to do this? " * The database isn't running or isn't configured correctly.\n" " * At least one of the expected database tables doesn't exist.\n" " * The SQL was invalid.\n" "Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL this command wasn't able to run.\n" "Hint: Look at the output of 'django-admin sqlflush'. That's the SQL this command wasn't able to run.\n" "The full error: %s") % (connection.settings_dict['NAME'], e) six.reraise(CommandError, CommandError(new_msg), sys.exc_info()[2]) Loading
django/core/management/commands/inspectdb.py +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ class Command(BaseCommand): yield "# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table" yield "# Feel free to rename the models, but don't rename db_table values or field names." yield "#" yield "# Also note: You'll have to insert the output of 'django-admin.py sqlcustom [app_label]'" yield "# Also note: You'll have to insert the output of 'django-admin sqlcustom [app_label]'" yield "# into your database." yield "from __future__ import unicode_literals" yield '' Loading
docs/_ext/djangodocs.py +1 −1 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator): def parse_django_admin_node(env, sig, signode): command = sig.split(' ')[0] env._django_curr_admin_command = command title = "django-admin.py %s" % sig title = "django-admin %s" % sig signode += addnodes.desc_name(title, title) return sig Loading