We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9ab4b78 + ae936de commit 66a2cfcCopy full SHA for 66a2cfc
1 file changed
devserver/management/commands/runserver.py
@@ -67,7 +67,15 @@ class Command(BaseCommand):
67
args = '[optional port number, or ipaddr:port]'
68
69
# Validation is called explicitly each time the server is reloaded.
70
- requires_model_validation = False
+ def __init__(self):
71
+ # `requires_model_validation` is deprecated in favor of
72
+ # `requires_system_checks`. If both options are present, an error is
73
+ # raised. BaseCommand sets requires_system_checks in >= Django 1.7.
74
+ if hasattr(self, 'requires_system_checks'):
75
+ requires_system_checks = False
76
+ else:
77
+ requires_model_validation = False # Django < 1.7
78
+ super(Command, self).__init__()
79
80
def run_from_argv(self, argv):
81
parser = self.create_parser(argv[0], argv[1])
0 commit comments