'Determines the HttpResponse for the change_view stage.'

def response_change(self, request, obj):

    opts = obj._meta
    pk_value = obj._get_pk_val()
    msg = (_('The    %(name)s    "%(obj)s"    was    changed    successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(obj)})
    if request.POST.has_key('_continue'):
        self.message_user(request, ((msg + '    ') + _('You    may    edit    it    again    below.')))
        if request.REQUEST.has_key('_popup'):
            return HttpResponseRedirect((request.path + '?_popup=1'))
        else:
            return HttpResponseRedirect(request.path)
    elif request.POST.has_key('_saveasnew'):
        msg = (_('The    %(name)s    "%(obj)s"    was    added    successfully.    You    may    edit    it    again    below.') % {'name': force_unicode(opts.verbose_name), 'obj': obj})
        self.message_user(request, msg)
        return HttpResponseRedirect(('../%s/' % pk_value))
    elif request.POST.has_key('_addanother'):
        self.message_user(request, ((msg + '    ') + (_('You    may    add    another    %s    below.') % force_unicode(opts.verbose_name))))
        return HttpResponseRedirect('../add/')
    else:
        self.message_user(request, msg)
        return HttpResponseRedirect('../')
