def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): if(session.__getitem__('securityLevel') == 2): self.response.out.write(webpages.header(session)) afspraken = entities.Afspraak.all() if(afspraken.count() == 0): inputFunctions.insertAfspraak() self.response.out.write('Afspraken toegevoegd aan de datastore') else: tableData = [] for afspraak in afspraken: tableRow = [] tableRow.append(afspraak.leerlingID) tableRow.append(afspraak.docentID) tableRow.append(afspraak.dag) tableRow.append(afspraak.tijd) tableRow.append(afspraak.tafelnummer) tableRow.append(afspraak.beschrijving) tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['leerlingID','DocentID','dag','Tijd','Tafelnummer','beschrijving'],title="Afspraken",divAttr='overzichtDiv',evenOdd=True)) self.response.out.write("<form action='/insert/afspraakpost' method='post'><input type='hidden' name='delete' value='delete' /><input type='submit' value='Delete All' /></form") self.response.out.write(webpages.footer()) else: self.redirect('/beheerder') else: self.redirect('/')
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): if(session.__getitem__('securityLevel') == 2): self.response.out.write(webpages.header(session)) boeken = entities.Boek.all() if(boeken.count() == 0): inputFunctions.insertBoek() self.response.out.write('Boeken toegevoegd aan de datastore') else: tableData = [] for boek in boeken: tableRow = [] tableRow.append(boek.isbn) tableRow.append(boek.titel) tableRow.append(boek.auteur) tableRow.append(boek.prijs) tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['isbn', 'titel', 'auteur', 'prijs'],title="Boeken",divAttr='overzichtDiv',evenOdd=True)) self.response.out.write("<form action='/insert/boekpost' method='post'><input type='hidden' name='delete' value='delete' /><input type='submit' value='Delete All' /></form") self.response.out.write(webpages.footer()) else: self.redirect('/beheerder') else: self.redirect('/')
def get(self): session = get_current_session() self.response.out.write(webpages.header(session)) if session.has_key("selectionReferer"): self.response.out.write("<h1><a href="+session["selectionReferer"]+">Continue with current selection</a></h1>") self.response.out.write("<a href='#' onclick='clearselection()' ><h3>Selectie verwijderen</h3></a>"); self.response.out.write("<script type='text/javascript' src='/js/selector.js'></SCRIPT>"); self.response.out.write("<div class='selectorDiv'>") self.response.out.write("<div class='leerlingSelectorDiv'>"); self.response.out.write("<h3>Individuele leerlingen toevoegen</h3>"); self.response.out.write("Zoek op id: <input type='text' id='leerlingIDText' onkeyup='textboxchange(this.value,\"leerling\");' />"); self.response.out.write("<div class='leerlingenOutputDiv' id='leerlingenOutputDiv'>"); self.response.out.write("</div>") self.response.out.write("</div>") self.response.out.write("<div class='klasSelectorDiv'>"); self.response.out.write("<h3>Klassen toevoegen</h3>"); self.response.out.write("Zoek op id: <input type='text' id='klasIDText' onkeyup='textboxchange(this.value,\"klas\");' />"); self.response.out.write("<div class='klassenOutputDiv' id='klassenOutputDiv'>"); self.response.out.write("</div>") self.response.out.write("</div>") self.response.out.write("<div class='selectedSelectorDiv'>"); self.response.out.write("<h3>Huidige Selectie</h3>"); self.response.out.write("<div class='selectedOutputDiv' id='selectedOutputDiv'>"); self.response.out.write("</div>") self.response.out.write("</div>") self.response.out.write("</div>") self.response.out.write(webpages.footer())
def get(self): session = get_current_session() header=webpages.header(session) session.__setitem__('header', header) self.response.out.write(header) self.response.out.write('Beheer pagina') self.response.out.write(webpages.footer())
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): if(session.__getitem__('securityLevel') == 2): self.response.out.write(webpages.header(session)) beheerders = entities.Beheerder.all() if(beheerders.count() == 0): inputFunctions.insertBeheerder() self.response.out.write('Beheerders toegevoegd aan de datastore') else: tableData = [] for beheerder in beheerders: tableRow = [] tableRow.append(beheerder.login) tableRow.append(beheerder.beschrijving) tableRow.append(beheerder.wachtwoord) tableRow.append(beheerder.securityLevel) tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['Login','Beschrijving','Wachtwoord','SecurityLevel'],title="Vakken",divAttr='overzichtDiv',evenOdd=True)) self.response.out.write("<form action='/insert/beheerderpost' method='post'><input type='hidden' name='delete' value='delete' /><input type='submit' value='Delete All' /></form") self.response.out.write(webpages.footer()) else: self.redirect('/beheerder') else: self.redirect('/')
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): if(session.__getitem__('securityLevel') == 2): self.response.out.write(webpages.header(session)) vakken = entities.VakPerKlas.all() if(vakken.count() == 0): inputFunctions.insertVakPerKlas() self.response.out.write('Vakken per klas toegevoegd aan de datastore') else: tableData = [] for vakPerKlas in vakken: tableRow = [] tableRow.append(vakPerKlas.jaargang) tableRow.append(vakPerKlas.klas) tableRow.append(vakPerKlas.vakCode) tableRow.append(vakPerKlas.docentID) tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['Jaargang','Klas','VakCode','DocentID'],title="Vakken",divAttr='overzichtDiv',evenOdd=True)) self.response.out.write("<form action='/insert/vakpost' method='post'><input type='hidden' name='delete' value='delete' /><input type='submit' value='Delete All' /></form") self.response.out.write(webpages.footer()) else: self.redirect('/beheerder') else: self.redirect('/')
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): if(session.__getitem__('securityLevel') == 2): self.response.out.write(webpages.header(session)) afspraken = entities.Afspraak.all() tableData = [] for afspraak in afspraken: tableRow = [] tableRow.append("<form action='/datastore/afspraakpost' method='post'>") tableRow.append("<input type='text' name='leeringID' value='"+afspraak.leerlingID+"' />") tableRow.append("<input type='text' name='docentID' value='"+afspraak.docentID+"' />") tableRow.append("<input type='text' name='dag' value='"+str(afspraak.dag)+"' />") tableRow.append("<input type='text' name='tijd' value='"+str(afspraak.tijd)+"' />") tableRow.append("<input type='text' name='tafelnummer' value='"+str(afspraak.tafelnummer)+"' />") tableRow.append("<input type='text' name='beschrijving' value='"+str(afspraak.beschrijving)+"' />") tableRow.append("<input type='hidden' name='key' value='"+str(afspraak.key())+"'><input type='submit' value='Aanpassen' /></form>") tableRow.append("<form action='/datastore/afspraakpost' method='post'><input type='hidden' name='key' value='"+str(afspraak.key())+"'><input type='hidden' name='delete' value='delete' />") tableRow.append("<input type='submit' value='Verwijderen' /></form>") tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['','leerlingID','DocentID','dag','Tijd','Tafelnummer','beschrijving'],title="Afspraken",divAttr='dataStoreDiv',evenOdd=True)) self.response.out.write(webpages.footer()) else: self.redirect('/beheerder') else: self.redirect('/')
def post(self): session = get_current_session() self.response.out.write(webpages.header(session)) docenten = self.request.get("checkedDocenten").split(",") datums = self.request.get("datums").split(",") splitDatums = [] for datum in datums: splitDatums.append(datum.split("-")) afspraken = [] try: for docent in docenten: for datum in splitDatums: afspraak = entities.Afspraak(leerlingID="0",docentID=docent,dag=datetime.date(int(datum[0]), int(datum[1]), int(datum[2])), tijd=-1,tafelnummer=0,beschrijving='#') afspraken.append(afspraak) #afspraak.put(); self.response.out.write(docent+" heeft ouderavond(en) op: <br />") for datum in datums: self.response.out.write(datum+" <br />") self.response.out.write("<br />") for afspraak in afspraken: afspraak.put() except: self.response.out.write("Datums verkeerd ingevoerd...") self.response.out.write(webpages.footer())
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): if(session.__getitem__('securityLevel') == 2): self.response.out.write(webpages.header(session)) docenten = entities.Docent.all() if(docenten.count() == 0): inputFunctions.insertDocent() self.response.out.write('Docenten toegevoegd aan de datastore') else: tableData = [] for docent in docenten: tableRow = [] tableRow.append(docent.docentID) tableRow.append(docent.aanhef) tableRow.append(docent.naam) tableRow.append(docent.postvaknummer) tableRow.append(docent.email) tableRow.append(docent.wachtwoord) tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['docentID','aanhef','naam','postvaknummer','email','wachtwoord'],title="Docenten",divAttr='overzichtDiv',evenOdd=True)) self.response.out.write("<form action='/insert/docentpost' method='post'><input type='hidden' name='delete' value='delete' /><input type='submit' value='Delete All' /></form") self.response.out.write(webpages.footer()) else: self.redirect('/beheerder') else: self.redirect('/')
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): if(session.__getitem__('securityLevel') == 2): self.response.out.write(webpages.header(session)) docenten = entities.Docent.all() tableData = [] for docent in docenten: tableRow = [] tableRow.append("<form action='/datastore/docentpost' method='post'>") tableRow.append("<input type='text' name='docentID' value='"+docent.docentID+"' />") tableRow.append("<input type='text' name='aanhef' value='"+docent.aanhef+"' />") tableRow.append("<input type='text' name='naam' value='"+docent.naam+"' />") tableRow.append("<input type='text' name='postvaknummer' value='"+str(docent.postvaknummer)+"' />") tableRow.append("<input type='text' name='email' value='"+docent.email+"' />") tableRow.append("<input type='text' name='wachtwoord' value='"+docent.wachtwoord+"' />") tableRow.append("<input type='hidden' name='key' value='"+str(docent.key())+"'><input type='submit' value='Aanpassen' /></form>") tableRow.append("<form action='/datastore/docentpost' method='post'><input type='hidden' name='key' value='"+str(docent.key())+"'><input type='hidden' name='delete' value='delete' />") tableRow.append("<input type='submit' value='Verwijderen' /></form>") tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['','docentID','aanhef','naam','postvaknummer','email','wachtwoord'],title="Docenten",divAttr='dataStoreDiv',evenOdd=True)) self.response.out.write(webpages.footer()) else: self.redirect('/beheerder') else: self.redirect('/')
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): self.response.out.write(webpages.header(session)) leerlingen = entities.Leerling.all() tableData = [] for leerling in leerlingen: tableRow = [] tableRow.append(leerling.leerlingID) tableRow.append(leerling.wachtwoord) tableRow.append(leerling.voornaam) tableRow.append(leerling.tussenvoegsel) tableRow.append(leerling.achternaam) tableRow.append(leerling.geslacht) tableRow.append(leerling.klas) tableRow.append(leerling.aanhefVerzorger) tableRow.append(leerling.initialenVerzorger) tableRow.append(leerling.voorvoegselsVerzorger) tableRow.append(leerling.achternaamVerzorger) tableRow.append(leerling.rolVerzorger) tableRow.append(leerling.adres) tableRow.append(leerling.huisnummer) tableRow.append(leerling.woonplaats) tableRow.append(leerling.postcode) tableRow.append(leerling.mobielnummer) tableRow.append(leerling.vastnummer) tableRow.append(leerling.email) tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['LeerlingID','Wachtwoord','Voornaam','Tussenvoegsel','Achternaam','Geslacht','Klas','AanhefVerzorger','InitialenVerzorger','VoorvoegselsVerzorger','AchternaamVerzorger','RolVerzorger','Adres','Huisnummer','Woonplaats','Postcode','Mobielnummer','Vastnummer','Email'],title="Vakken",divAttr='overzichtDiv',evenOdd=True)) self.response.out.write(webpages.footer()) else: self.redirect('/')
def post(self): if(self.request.get('delete') == 'delete'): boeken = db.GqlQuery("SELECT * FROM Boek") for boek in boeken: boek.delete() session = get_current_session() self.response.out.write(webpages.header(session)) self.response.out.write("<p>Deleted all entries <a href='/insert/boek'>terug (insert nieuwe data)</a></p></body></html>") self.response.out.write(webpages.footer())
def get(self): session = get_current_session() self.response.out.write(webpages.header(session)) self.response.out.write("<h1>Map root</h1>") session["selectionReferer"] = "/map" self.response.out.write("<a href='/selector'><h3>Selecteer leerlingen</h3></a>") self.response.out.write("<h1><a href='/map/afstanden'>Afstanden App</a></h1>") self.response.out.write("<h1><a href='/map/kortsteroute'>Route planner</a></h1>") self.response.out.write(webpages.footer())
def post(self): session = get_current_session() self.response.out.write(webpages.header(session)) if(session.has_key('id')): roomGet = self.request.get('room') if(roomGet in session['rooms']): self.response.out.write(webpages.chatBox(session['id'],roomGet)) else: self.response.out.write("Geen toegang tot deze chatroom") self.response.out.write(webpages.footer())
def get(self): session = get_current_session() self.response.out.write(webpages.header(session)) if(session.has_key('id') and session.__getitem__('loginType') == 'leerling'): leerling = db.GqlQuery("SELECT * FROM Leerling where leerlingID = '"+session['id']+"'") leerling = leerling[0] self.response.out.write(webpages.klasAfspraakPage(klas=leerling.klas,leerlingID=leerling.leerlingID)) else: self.redirect('/') self.response.out.write(webpages.footer())
def get(self): session = get_current_session() header=webpages.header(session) session.__setitem__('header', header) self.response.out.write(header) if(session.__getitem__('securityLevel') == 2): self.response.out.write(webpages.cmsHeader()) self.response.out.write(webpages.cmsFooter()) self.response.out.write(webpages.footer())
def get(self): session = get_current_session() self.response.out.write(webpages.header(session)) if(session.has_key('id') and session.__getitem__('loginType') == "docent"): docent = db.GqlQuery("SELECT * FROM Docent where docentID = '"+session['id']+"'") docent = docent[0] self.response.out.write(webpages.DocentPage(docent)) else: self.redirect('/') self.response.out.write(webpages.footer())
def get(self): session = get_current_session() self.response.out.write(webpages.header(session)) session["selectionReferer"] = "/stuuremail" if not session['selectorList']: self.response.out.write("<a href='/selector'><h3>Selecteer leerlingen</h3></a>") self.response.out.write("<a href='/berichtenVersturen'><h3>Of verstuur naar iedereen</h3></a>") else: self.response.out.write("<a href='/selector'><h3>Pas huidige selectie leerlingen aan</h3></a>") self.response.out.write("<a href='/berichtenVersturen'><h3>Of verstuur met de huidige selectie</h3></a>") self.response.out.write(webpages.footer())
def post(self): if(self.request.get('delete') == 'delete'): leerlingen = db.GqlQuery("SELECT * FROM Leerling") for leerling in leerlingen: leerling.delete() session = get_current_session() klassen = db.GqlQuery("SELECT * FROM Klas") for klas in klassen: klas.delete() session = get_current_session() self.response.out.write(webpages.header(session)) self.response.out.write("<p>Deleted all entries <a href='/insert/leerling'>terug (insert nieuwe data)</a></p></body></html>") self.response.out.write(webpages.footer())
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): self.response.out.write(webpages.header(session)) self.response.out.write(webpages.link('/overzichten/afspraak',"Afspraak")) self.response.out.write(webpages.link('/overzichten/docent',"Docent")) self.response.out.write(webpages.link('/overzichten/vak',"Vak")) self.response.out.write(webpages.link('/overzichten/vakperklas',"Vak per klas")) self.response.out.write(webpages.link('/overzichten/leerling',"Leerling")) self.response.out.write(webpages.link('/overzichten/beheerder',"Beheerder")) self.response.out.write(webpages.footer()) else: self.redirect('/')
def get(self): session = get_current_session() self.response.out.write(webpages.header(session)) distances = [1,2,5,7,10,15] counts = [0,0,0,0,0,0] g = geocoders.Google() place, (lat, lng) = g.geocode("Kanaalstraat 31, 2801 SH Gouda") school = db.GeoPt(lat,lng) leerlingen = selector.getList() if not leerlingen: leerlingen = entities.Leerling.all().fetch(MAX) for leerling in leerlingen: if leerling.lokatie: distanceTo = haversine(school,leerling.lokatie) for i in range(len(distances)): if distanceTo < distances[i]: counts[i] += 1 break session["selectionReferer"] = "/map/afstanden" self.response.out.write("<a href='/selector'><h3>Selecteer leerlingen</h3></a>") self.response.out.write("<h1>Afstanden van leerlingen tot de school</h1><br /><table border='1'>") self.response.out.write(""" <script> $(document).ready(function() { var myOptions = { center: new google.maps.LatLng(52.015043, 4.695895), zoom: 11, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions); var image = '/images/marker.png'; var test = new google.maps.LatLng(-33.890542, 151.274856); var marker = new google.maps.Marker({ position: new google.maps.LatLng(52.015043, 4.695895), map: map }); """) for leerling in leerlingen: self.response.out.write("var marker = new google.maps.Marker({ position: new google.maps.LatLng(%s,%s),map: map,icon:'/images/marker.png'});" %(str(leerling.lokatie.lat),str(leerling.lokatie.lon))) for distance in distances: self.response.out.write("var options = {strokeColor: '#FF0000',strokeOpacity: 0.5,strokeWeight: 2,fillColor: '#000000',fillOpacity: 0.00,map: map,center: new google.maps.LatLng(%s, %s),radius: %s};circle = new google.maps.Circle(options);" %(str(school.lat),str(school.lon),str(distance * 1000))) self.response.out.write("""});</script><script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBUHKNVPkzNbOjejdzPKIVIMK12IU7w4Vg&sensor=false"></script><div id="map_canvas" style="width:100%; height:100%"></div>""") #self.response.out.write("<a href='#' onclick='test()'>test</a>") for i in range(len(counts)): self.response.out.write("<tr><td>"+str(distances[i])+"km</td><td>"+str(counts[i])+"</td></tr> <br />") self.response.out.write("</table>") self.response.out.write(webpages.footer())
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): self.response.out.write(webpages.header(session)) vakken = entities.Vak.all() tableData = [] for vak in vakken: tableRow = [] tableRow.append(vak.vakCode) tableRow.append(vak.vakNaam) tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['VakCode','VakNaam'],title="Vakken",divAttr='overzichtDiv',evenOdd=True)) self.response.out.write(webpages.footer()) else: self.redirect('/')
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): if(session.__getitem__('securityLevel') == 2): self.response.out.write(webpages.header(session)) self.response.out.write(webpages.insertRootLink("Afspraak")) self.response.out.write(webpages.insertRootLink("Docent")) self.response.out.write(webpages.insertRootLink("Vak")) self.response.out.write(webpages.insertRootLink("VakPerKlas")) self.response.out.write(webpages.insertRootLink("Leerling")) self.response.out.write(webpages.insertRootLink("Beheerder")) self.response.out.write(webpages.insertRootLink("Boek")) self.response.out.write(webpages.footer()) else: self.redirect('/beheerder') else: self.redirect('/')
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): self.response.out.write(webpages.header(session)) beheerders = entities.Beheerder.all() tableData = [] for beheerder in beheerders: tableRow = [] tableRow.append(beheerder.login) tableRow.append(beheerder.beschrijving) tableRow.append(beheerder.wachtwoord) tableRow.append(beheerder.securityLevel) tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['Login','Beschrijving','Wachtwoord','SecurityLevel'],title="Vakken",divAttr='overzichtDiv',evenOdd=True)) self.response.out.write(webpages.footer()) else: self.redirect('/')
def get(self): id = self.request.get('id') leerling = None result = db.GqlQuery("SELECT * FROM Leerling WHERE leerlingID = '%s'"%(id)) if result.count()>0: leerling = result[0] self.response.out.write(webpages.header(get_current_session())) self.response.out.write(webpages.cmsHeader()) if not leerling: self.response.out.write(webpages.addStudent(newLeerlingID(), leerlingIDS(), klassenLijst())) else: self.response.out.write(webpages.modifyStudent(leerling, leerlingIDS(), klassenLijst())) self.response.out.write(webpages.cmsFooter()) self.response.out.write(webpages.footer())
def get(self): self.response.out.write(webpages.header(get_current_session())) self.response.out.write(webpages.cmsHeader()) id = self.request.get('id') docent = None result = db.GqlQuery("SELECT * FROM Docent WHERE docentID = '%s'"%(id)) if result.count()>0: docent = result[0] if not docent: self.response.out.write(webpages.addDocent(docentIDS())) else: self.response.out.write(webpages.modifyDocent(docent, docentIDS())) self.response.out.write(webpages.cmsFooter()) self.response.out.write(webpages.footer())
def get(self): self.response.out.write(webpages.header(get_current_session())) self.response.out.write(webpages.cmsHeader()) id = self.request.get('id') beheerder = None result = db.GqlQuery("SELECT * FROM Beheerder WHERE login = '******'"%(id)) if result.count()>0: beheerder = result[0] if not beheerder: self.response.out.write(webpages.addBeheerderPage(beheerderIDS())) else: self.response.out.write(webpages.modifyBeheerder(beheerder, beheerderIDS())) self.response.out.write(webpages.cmsFooter()) self.response.out.write(webpages.footer())
def get(self): self.response.out.write(webpages.header(get_current_session())) self.response.out.write(webpages.cmsHeader()) vakCode = self.request.get('id') vak = None result = db.GqlQuery("SELECT * FROM Vak WHERE vakCode = '%s'"%(vakCode)) if result.count()>0: vak = result[0] if not vak: self.response.out.write(webpages.addVakPage(vakken())) else: self.response.out.write(webpages.modifyVak(vak, vakken())) self.response.out.write(webpages.cmsFooter()) self.response.out.write(webpages.footer())
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): self.response.out.write(webpages.header(session)) afspraken = entities.Afspraak.all() tableData = [] for afspraak in afspraken: tableRow = [] tableRow.append(afspraak.leerlingID) tableRow.append(afspraak.docentID) tableRow.append(afspraak.dag) tableRow.append(afspraak.tijd) tableRow.append(afspraak.tafelnummer) tableRow.append(afspraak.beschrijving) tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['leerlingID','DocentID','dag','Tijd','Tafelnummer','beschrijving'],title="Afspraken",divAttr='overzichtDiv',evenOdd=True)) self.response.out.write(webpages.footer()) else: self.redirect('/')
def get(self): session = get_current_session() if(session.__getitem__('loginType') == 'beheerder'): self.response.out.write(webpages.header(session)) docenten = entities.Docent.all() tableData = [] for docent in docenten: tableRow = [] tableRow.append(docent.docentID) tableRow.append(docent.aanhef) tableRow.append(docent.naam) tableRow.append(docent.postvaknummer) tableRow.append(docent.email) tableRow.append(docent.wachtwoord) tableData.append(tableRow) self.response.out.write(webpages.table(data=tableData, attributes="class='overzichtTable" ,head=['docentID','aanhef','naam','postvaknummer','email','wachtwoord'],title="Docenten",divAttr='overzichtDiv',evenOdd=True)) self.response.out.write(webpages.footer()) else: self.redirect('/')