diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2020-12-24 16:29:54 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-01-18 12:51:35 +0100 |
| commit | 34aa4f1997bd7f1fb0c43d6d1c6848e86b928f2e (patch) | |
| tree | f04e2ea28c149c3c98b185dd6a42f6c75ea2b6dc /django | |
| parent | e8b4f23115237047c907fca4565020f30ad35a7c (diff) | |
Fixed #32296 -- Added --skip-checks option to runserver command.
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/management/commands/runserver.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/django/core/management/commands/runserver.py b/django/core/management/commands/runserver.py index d9fb088350..1e8f4d3b25 100644 --- a/django/core/management/commands/runserver.py +++ b/django/core/management/commands/runserver.py @@ -51,6 +51,10 @@ class Command(BaseCommand): '--noreload', action='store_false', dest='use_reloader', help='Tells Django to NOT use the auto-reloader.', ) + parser.add_argument( + '--skip-checks', action='store_true', + help='Skip system checks.', + ) def execute(self, *args, **options): if options['no_color']: @@ -114,8 +118,9 @@ class Command(BaseCommand): shutdown_message = options.get('shutdown_message', '') quit_command = 'CTRL-BREAK' if sys.platform == 'win32' else 'CONTROL-C' - self.stdout.write("Performing system checks...\n\n") - self.check(display_num_errors=True) + if not options['skip_checks']: + self.stdout.write('Performing system checks...\n\n') + self.check(display_num_errors=True) # Need to check migrations here, so can't use the # requires_migrations_check attribute. self.check_migrations() |
