def change_view(self, request, object_id, extra_context=None): extra_context = extra_context or {} problem = get_object_or_404(ImportProblem, pk=object_id) extra_context['resource_link'] = get_edit_url(problem.resource) return super(ImportProblemAdmin, self).change_view( request, object_id, extra_context, )
def edit_url(object_): """Returns the url of edit page for a given object (currently implemented for Users, expand if needed) """ return get_edit_url(object_)