mirror of
https://github.com/django/django.git
synced 2025-10-26 23:26:08 +00:00
Skip model validation when models are known good.
In some situations Django calls model validation when the models are already known good. This is most visible in tests, which use flush and loaddata commands. This resulted in around 10% overhead when running tests under sqlite.
This commit is contained in:
@@ -160,4 +160,5 @@ class Command(NoArgsCommand):
|
||||
# Load initial_data fixtures (unless that has been disabled)
|
||||
if load_initial_data:
|
||||
from django.core.management import call_command
|
||||
call_command('loaddata', 'initial_data', verbosity=verbosity, database=db)
|
||||
call_command('loaddata', 'initial_data', verbosity=verbosity,
|
||||
database=db, skip_validation=True)
|
||||
|
||||
Reference in New Issue
Block a user