'Determines the HttpResponse for the add_view stage.'

def response_add(self, request, obj, post_url_continue='../%s/'):

    opts = obj._meta
    pk_value = obj._get_pk_val()
    msg = (_('The    %(name)s    "%(obj)s"    was    added    successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(obj)})
    if ('_continue' in request.POST):
        self.message_user(request, ((msg + '    ') + _('You    may    edit    it    again    below.')))
        if ('_popup' in request.POST):
            post_url_continue += '?_popup=1'
        return HttpResponseRedirect((post_url_continue % pk_value))
    if ('_popup' in request.POST):
        return HttpResponse(('<script    type="text/javascript">opener.dismissAddAnotherPopup(window,    "%s",    "%s");</script>' % (escape(pk_value), escapejs(obj))))
    elif ('_addanother' in request.POST):
        self.message_user(request, ((msg + '    ') + (_('You    may    add    another    %s    below.') % force_unicode(opts.verbose_name))))
        return HttpResponseRedirect(request.path)
    else:
        self.message_user(request, msg)
        if self.has_change_permission(request, None):
            post_url = '../'
        else:
            post_url = '../../../'
        return HttpResponseRedirect(post_url)
