Exemple #1
0
def active_user():
	id=bottle.request.get_cookie("user",None)
	if id:
		ret = Member.load(id)
		passw = bottle.request.get_cookie("pass")
		if ret.password==passw:
			return ret
Exemple #2
0
def make_member():
	email = bottle.request.forms.get("email",None)
	passw = bottle.request.forms.get("pass",None)
	name = bottle.request.forms.get("name",None)
	new_user = Member()
	new_user.update({"email":email,"password":passw,"name":name})
	new_user.save()
	return flash_message("You have registered! Now go sign in.","/login","Success")