Beispiel #1
0
def get_user():
    from apps.store.models import User
    try:
        user = User.objects.get(u'_')
    except KeyError:
        user = User(None)
        user.id = u'_'
        User.objects.set(user)
    return user
def users(request):
	print "Users"
	user = User.objects.filter(
		email = request.POST.get('email')
	)
	if len(user) > 0 and len(request.POST.get('email'))<3:
		return redirect('/')
	else:
		user = User()
		user.first_name = request.POST.get('first_name')
		user.last_name = request.POST.get('last_name')
		user.email = request.POST.get('email')
		user.password = request.POST.get('password')
		user.save()
		print "Successful Registration"
		print user.email
		print user.password
		return redirect('/')