File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
devserver/management/commands Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,15 @@ class Command(BaseCommand):
67
67
args = '[optional port number, or ipaddr:port]'
68
68
69
69
# Validation is called explicitly each time the server is reloaded.
70
- requires_model_validation = False
70
+ 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__ ()
71
79
72
80
def run_from_argv (self , argv ):
73
81
parser = self .create_parser (argv [0 ], argv [1 ])
You can’t perform that action at this time.
0 commit comments