def index(self): """ if they are already logged in passes them through. else, gives them the login form """ # try and pull the user's data user = get_active_user_data() if not user: # they are not logged in give them the login form return render("/login_form.html") # they are logged in, pass them to the home page redirect("/")
def index(self): """ if they are already logged in passes them through. else, gives them the login form """ # try and pull the user's data user = get_active_user_data() if not user: # they are not logged in give them the login form return render('/login_form.html') # they are logged in, pass them to the home page redirect('/')
def index(self): # return back the admin home page # for now set the user to me set_active_user('237823077639407214003259210226144395600') # get our user's data user_data = get_active_user_data() cherrypy.log('active_user: %s %s' % (cherrypy.session.get('user_hash'),user_data)) # we need to get the user's events event_datas = o.Event.get_relatives_data(user_data) return render('/admin/home.html', event_datas=event_datas)