def elements_timeperiod(name): user = app.get_user_auth() if not user: redirect("/user/login") elt = app.datamgr.get_timeperiod(name) if not elt: elt = {} return {'app': app, 'user': user, 'elt': elt, 'helper': Helper(app)}
def elements_host(name): user = app.get_user_auth() if not user: redirect("/user/login") #elt = app.db.hosts.find_one({'_id': name}) elt = app.datamgr.get_host(name) if not elt: elt = {} return {'app': app, 'user': user, 'elt': elt, 'helper': Helper(app)}
def new_object(): user = app.get_user_auth() if not user: redirect("/user/login") return {'app': app, 'user': user, 'elt': {}, 'helper': Helper(app)}