Beispiel #1
0
def register_customer(request):
	email = request.POST['email'].lower()
	phone = parse_phone_number(request.POST['phone'])
	zipcode = request.POST['zipcode']
	password = request.POST['password']
    
	#TODO check null
	data = customer_register(email, None, zipcode, phone, password, None, None)
	
	if data["result"] == 1:
		data = customer_authenticate(request, data["username"], data["password"]);
		
	return JSONHttpResponse(data)
Beispiel #2
0
def mobile_login(request):
	email = request.POST['email'].lower()
	password = request.POST['password']
	data = customer_authenticate(request, email, password)
	return JSONHttpResponse(data)