From c7685ca70a54debf5f1876a59307b670c46c90e4 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sat, 25 May 2013 14:17:22 -0400 Subject: [PATCH] Fix parameters to inherited change_view function Must be the same as in in the inherited-from class, or we ended up passing a python dict as a string, and render the contents of it as the "action" attribute on the form. --- pgweb/util/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pgweb/util/admin.py b/pgweb/util/admin.py index 371de9e7..186d1200 100644 --- a/pgweb/util/admin.py +++ b/pgweb/util/admin.py @@ -27,14 +27,14 @@ class PgwebAdmin(admin.ModelAdmin): fld.widget.attrs['class'] = fld.widget.attrs['class'] + ' markdown_preview' return fld - def change_view(self, request, object_id, extra_context=None): + def change_view(self, request, object_id, form_url='', extra_context=None): if self.model.send_notification: # Anything that sends notification supports manual notifications if extra_context == None: extra_context = dict() extra_context['notifications'] = ModerationNotification.objects.filter(objecttype=self.model.__name__, objectid=object_id).order_by('date') - return super(PgwebAdmin, self).change_view(request, object_id, extra_context) + return super(PgwebAdmin, self).change_view(request, object_id, form_url, extra_context) # Remove the builtin delete_selected action, so it doesn't # conflict with the custom one. -- 2.39.5