summaryrefslogtreecommitdiff
path: root/django/contrib/admin/options.py
diff options
context:
space:
mode:
authorBrian Rosner <brosner@gmail.com>2008-08-23 05:05:21 +0000
committerBrian Rosner <brosner@gmail.com>2008-08-23 05:05:21 +0000
commit58c579b0056bbc8e50cdc2436929fc9703bfcab5 (patch)
tree3d3986f93e4d96bbf38cb5626cfdc641faf674c4 /django/contrib/admin/options.py
parent324befc477757961d28c89013151d51bf413f0db (diff)
downloaddjango-58c579b0056bbc8e50cdc2436929fc9703bfcab5.tar.gz
Fixed #8367 -- Pass the object to get_form from get_fieldsets in ModelAdmin. Thanks jarrow for catching this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8479 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/admin/options.py')
-rw-r--r--django/contrib/admin/options.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 63acbb4b1b..1d00683012 100644
--- a/django/contrib/admin/options.py
+++ b/django/contrib/admin/options.py
@@ -247,7 +247,7 @@ class ModelAdmin(BaseModelAdmin):
"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):