@csrf_exempt
def create_account(request, post_override=None):
 warnings.warn('Please use RegistrationView instead.', DeprecationWarning)
 try:
  user = create_account_with_params(request, (post_override or request.POST))
 except AccountValidationError as exc:
  return JsonResponse({'success': False, 'value': exc.message, 'field': exc.field}, status=400)
 except ValidationError as exc:
  (field, error_list) = next(exc.message_dict.iteritems())
  return JsonResponse({'success': False, 'field': field, 'value': error_list[0]}, status=400)
 redirect_url = None
 if (third_party_auth.is_enabled() and pipeline.running(request)):
  running_pipeline = pipeline.get(request)
  redirect_url = pipeline.get_complete_url(running_pipeline['backend'])
 response = JsonResponse({'success': True, 'redirect_url': redirect_url})
 set_logged_in_cookies(request, response, user)
 return response

@ csrf_exempt def create_account ( request , post_override = None ) : warnings . warn ( 'Please use RegistrationView instead.' , DeprecationWarning ) try : user = create_account_with_params ( request , ( post_override or request . POST ) ) except AccountValidationError as exc : return JsonResponse ( { 'success' : False , 'value' : exc . message , 'field' : exc . field } , status = 400 ) except ValidationError as exc : ( field , error_list ) = next ( exc . message_dict . iteritems ( ) ) return JsonResponse ( { 'success' : False , 'field' : field , 'value' : error_list [ 0 ] } , status = 400 ) redirect_url = None if ( third_party_auth . is_enabled ( ) and pipeline . running ( request ) ) : running_pipeline = pipeline . get ( request ) redirect_url = pipeline . get_complete_url ( running_pipeline [ 'backend' ] ) response = JsonResponse ( { 'success' : True , 'redirect_url' : redirect_url } ) set_logged_in_cookies ( request , response , user ) return response
create an account cli examples: salt myminion stormpath .