Author: brosner
Date: 2008-08-23 00:05:21 -0500 (Sat, 23 Aug 2008)
New Revision: 8479

Modified:
   django/trunk/django/contrib/admin/options.py
Log:
Fixed #8367 -- Pass the object to get_form from get_fieldsets in ModelAdmin. 
Thanks jarrow for catching this.

Modified: django/trunk/django/contrib/admin/options.py
===================================================================
--- django/trunk/django/contrib/admin/options.py        2008-08-23 05:04:59 UTC 
(rev 8478)
+++ django/trunk/django/contrib/admin/options.py        2008-08-23 05:05:21 UTC 
(rev 8479)
@@ -247,7 +247,7 @@
         "Hook for specifying fieldsets for the add form."
         if self.declared_fieldsets:
             return self.declared_fieldsets
-        form = self.get_form(request)
+        form = self.get_form(request, obj)
         return [(None, {'fields': form.base_fields.keys()})]
 
     def get_form(self, request, obj=None, **kwargs):


--~--~---------~--~----~------------~-------~--~----~
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