

def change_view(self, request, object_id, extra_context=None):
    from moderation import moderation
    moderated_object = ModeratedObject.objects.get(pk=object_id)
    changed_obj = moderator.changed_object
    moderator = moderation.get_moderator(changed_obj.__class__)
    if moderator.visible_until_rejected:
        old_object = changed_obj
        new_object = moderated_object.get_object_for_this_type()
    else:
        old_object = moderated_object.get_object_for_this_type()
        new_object = changed_obj
    changes = list(get_changes_between_models(old_object, new_object, moderator.fields_exclude).values())
    if request.POST:
        admin_form = self.get_form(request, moderated_object)(request.POST)
        if admin_form.is_valid():
            reason = admin_form.cleaned_data['moderation_reason']
            if ('approve' in request.POST):
                moderated_object.approve(request.user, reason)
            elif ('reject' in request.POST):
                moderated_object.reject(request.user, reason)
    content_type = ContentType.objects.get_for_model(changed_obj.__class__)
    try:
        object_admin_url = urlresolvers.reverse(('admin:%s_%s_change' % (content_type.app_label, content_type.model)), args=(changed_obj.pk,))
    except urlresolvers.NoReverseMatch:
        object_admin_url = None
    extra_context = {
        'changes': changes,
        'django_version': django.get_version()[:3],
        'object_admin_url': object_admin_url,
    }
    return super(ModeratedObjectAdmin, self).change_view(request, object_id, extra_context=extra_context)

dataset/ETHPy150Open dominno/django-moderation/moderation/admin.py ModeratedObjectAdmin.change_view/VarMisuse@38/56 `moderated_object`->`moderator`