Move admin validation to only run as part of "validate" management command
|Reported by:||Malcolm Tredinnick||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Normal practice within Django is that validation code is only run when requested, since code is correct more often than it is wrong. The admin validation code runs every time a URL conf file is imported and
DEBUG = True. It should be moved to be part of the
django-admin.py validate run.
This isn't entirely trivial, since it's a bit tied up with admin registration and that's an issue when
admin.autodiscover() is used.