def get(self): elevInfo_query = ElevInfo.all().order('-TilmeldtDate') elevInfo = elevInfo_query.fetch(9999) if users.get_current_user(): url = users.create_logout_url(self.request.uri) url_linktext = 'Logout' else: url = users.create_login_url(self.request.uri) url_linktext = 'Login' tilmeldt_count = '123' betalt_count = 12 template_values = { 'elevInfo': elevInfo, 'tilmeldt_count': tilmeldt_count, 'betalt_count': betalt_count, } path = os.path.join(os.path.dirname(__file__), 'repport.html') self.response.out.write(template.render(path, template_values))
def store_tilmelding(self): self.request.charset='utf-8' elev = ElevInfo() elev.ElevNavn = data[Enavn] elev.ElevAdresse = data[Eadr] elev.ElevPostBy = data[Epostby] elev.ElevCpr = data[Ecpr] elev.ElevEpost = data[Eepost] elev.ElevMobil = data[Emobil] elev.ElevInstrument = data[Einstrument] elev.ElevNiveau = data[Eniveau] elev.ElevEnerum = data[Eene] elev.ElevSRabat = data[Erabat] elev.ForaeldreNavn = data[Fnavn] elev.ForaeldreAdresse = data[Fadr] elev.ForaeldrePostBy = data[Fpostby] elev.ForaeldreEpost = data[Fepost] elev.ForaeldreFastnet = data[Ffnum] elev.ForaeldrMobil = data[Fmnum] elev.Besked = data[Besked][:500] elev.put()