Ticket #7758: options.py.patch

File options.py.patch, 1.0 KB (added by Rozza, 16 years ago)

Adds a form_url to the change_view method and then passes it to the render_change_form

  • django/contrib/admin/options.py

     
    542542        context.update(extra_context or {})
    543543        return self.render_change_form(request, context, add=True)
    544544
    545     def change_view(self, request, object_id, extra_context=None):
     545    def change_view(self, request, object_id, form_url='', extra_context=None):
    546546        "The 'change' admin view for this model."
    547547        model = self.model
    548548        opts = model._meta
     
    604604            'root_path': self.admin_site.root_path,
    605605        }
    606606        context.update(extra_context or {})
    607         return self.render_change_form(request, context, change=True, obj=obj)
     607        return self.render_change_form(request, context, change=True, obj=obj, form_url=form_url)
    608608
    609609    def changelist_view(self, request, extra_context=None):
    610610        "The 'change list' admin view for this model."
Back to Top