Skip to content

Instantly share code, notes, and snippets.

@nguyenbathanh
Last active September 15, 2019 02:49
Show Gist options
  • Save nguyenbathanh/953c5eb2bcb6e50955adf970db463a53 to your computer and use it in GitHub Desktop.
Save nguyenbathanh/953c5eb2bcb6e50955adf970db463a53 to your computer and use it in GitHub Desktop.
Django Development Server - Skip system checks and migration checks
# 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