def get(self): template_values = { 'page': "Login", } template_values['login_url'] = users.create_login_url('/Siteadmin') self.response.out.write( template.render(gettemplate('Login'), template_values))
def get(self): template_values = { 'page': "Contact", 'msg_sent_status': False, } self.response.out.write( template.render(gettemplate('Courses'), template_values))
def get(self): template_values = { 'page': "About", 'msg_sent_status': False, } self.response.out.write( template.render(gettemplate('About'), template_values))
def get(self): template_values = {} user = users.get_current_user() template_values['name'] = user.nickname() template_values.update(parseSentStatus(self)) if user and users.is_current_user_admin(): template_values['logout_url'] = users.create_logout_url( '/Login' ) # redirecting to Login Page After successfull logout. template_values['upload_url'] = blobstore.create_upload_url( '/Siteadmin/SubmitTeacher' ) # default upload url for blob store. self.response.out.write( template.render(gettemplate('CreateTeacher'), template_values)) else: template_values['logout_url'] = users.create_logout_url('/Login') self.response.out.write( template.render(gettemplate('Login'), template_values))
def get(self): que = Event.query() events = que.order(Event.title).fetch() template_values = { 'page': "Events", 'msg_sent_status': False, 'events': events, } #res = dict(results[0]) self.response.out.write( template.render(gettemplate('Events'), template_values))
def get(self): template_values = { 'page': "Siteadmin", 'title': None, 'sent_status': None, 'msg': None, } user = users.get_current_user() template_values['name'] = user.nickname() if user and users.is_current_user_admin(): template_values['logout_url'] = users.create_logout_url( '/Login' ) # redirecting to Login Page After successfull logout. self.response.out.write( template.render(gettemplate('Siteadmin'), template_values)) else: template_values['logout_url'] = users.create_logout_url('/Login') self.response.out.write( template.render(gettemplate('Login'), template_values))
def get(self): query = Teacher.query() teachers = query.fetch() template_values = { 'page': "Teachers", 'msg_sent_status': False, 'teachers': teachers, } self.response.out.write( template.render(gettemplate('Teachers'), template_values))
def post(self): template_values = { 'page': "Contact", 'msg_sent_status': False, } msg = getMsgValues(self) if not checkPhoneNumber(msg.phonevalue, msg.countrycode): template_values['msg_sent_status'] = False template_values['msg'] = "Invalid Phone number" self.response.out.write( template.render(gettemplate('Contact'), template_values)) template_values['msg'] = None template_values['msg_sent_status'] = True msg = Messages(parent=ndb.Key("MSG", msg.emailvalue or "*notice*"), name=msg.namevalue, email=msg.emailvalue, phone=msg.phonevalue, subject=msg.subjectvalue, message=msg.completemessage) msg.put() self.response.out.write( template.render(gettemplate('Contact'), template_values))
def get(self): template_values = {} self.response.out.write( template.render(gettemplate('Calendar'), template_values))