Example #1
0
	def start(self):
		db = ProfileDb()
		db.open()
		
		if db.size() == 0:
			return ProfileManager().new()
		else:
			if db.size() == 1:
				profile = db.get_first()
				if profile.auto_login == 'on':
					print "Register and redirect"
					return
			
		template = Template(file="web/profile_select.tpl")
		template.profiles = db.find_all()
		db.close()
		return str(template)