Author: mtredinnick
Date: 2008-08-26 18:06:30 -0500 (Tue, 26 Aug 2008)
New Revision: 8605

Modified:
   django/trunk/django/contrib/admin/validation.py
Log:
Fixed #8569 -- Ensure that apps are correctly set up before introspecting them
in admin validation.


Modified: django/trunk/django/contrib/admin/validation.py
===================================================================
--- django/trunk/django/contrib/admin/validation.py     2008-08-26 23:06:24 UTC 
(rev 8604)
+++ django/trunk/django/contrib/admin/validation.py     2008-08-26 23:06:30 UTC 
(rev 8605)
@@ -17,6 +17,10 @@
     classmethod in the end if it is provided in cls. The signature of the
     custom validation classmethod should be: def validate(cls, model).
     """
+    # Before we can introspect models, they need to be fully loaded so that
+    # inter-relations are set up correctly. We force that here.
+    models.get_apps()
+
     opts = model._meta
     validate_base(cls, model)
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to