def post(request, domain, app_id=None): if domain_requires_auth(domain): # "redirect" to the secure version # an actual redirect doesn't work because it becomes a GET return secure_post(request, domain, app_id) return _process_form( request=request, domain=domain, app_id=app_id, user_id=None, authenticated=False, )
def post(request, domain, app_id=None): try: if domain_requires_auth(domain): # "redirect" to the secure version # an actual redirect doesn't work because it becomes a GET return secure_post(request, domain, app_id) except ResourceNotFound: return HttpResponseBadRequest('No domain with name %s' % domain) return _process_form( request=request, domain=domain, app_id=app_id, user_id=None, authenticated=False, )
def post(request, domain, app_id=None): try: if domain_requires_auth(domain): # "redirect" to the secure version # an actual redirect doesn't work because it becomes a GET return secure_post(request, domain, app_id) except ResourceNotFound: return HttpResponseBadRequest( 'No domain with name %s' % domain ) return _process_form( request=request, domain=domain, app_id=app_id, user_id=None, authenticated=False, )