Last active
September 15, 2019 02:49
-
-
Save nguyenbathanh/953c5eb2bcb6e50955adf970db463a53 to your computer and use it in GitHub Desktop.
Django Development Server - Skip system checks and migration checks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You need to put this under <app>/management/commands/run.py | |
# where <app> is whatever appropriate app should have this command. | |
# Then you can invoke it with ./manage.py run and you'll get something like: | |
# Performing system checks... | |
# SKIPPING SYSTEM CHECKS! | |
# SKIPPING MIGRATION CHECKS! | |
# September 15, 2019 - 02:42:06 | |
# Django version 2.2.5, using settings 'app.settings' | |
# Starting development server at http://127.0.0.1:8000/ | |
# Quit the server with CONTROL-C. | |
from django.core.management.commands.runserver import Command as RunServer | |
class Command(RunServer): | |
def check(self, *args, **kwargs): | |
self.stdout.write(self.style.WARNING("SKIPPING SYSTEM CHECKS!\n")) | |
def check_migrations(self, *args, **kwargs): | |
self.stdout.write(self.style.WARNING("SKIPPING MIGRATION CHECKS!\n")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source: https://stackoverflow.com/questions/41438593/skip-system-checks-on-django-server-in-debug-mode-in-pycharm.