Datenbank-Zusammenfassung hinzugefuegt
Antworten werden nun nur noch gespeichert, wenn das Text- oder Bewertungsfeld nicht leer ist
This commit is contained in:
parent
4807ec5dc3
commit
cac5ec5db2
2 changed files with 78 additions and 5 deletions
46
umfrage_kirchenplatz2012/templates/db.html
Normal file
46
umfrage_kirchenplatz2012/templates/db.html
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xmlns:py="http://genshi.edgewall.org/"
|
||||
lang="de">
|
||||
<xi:include href="layout.html" />
|
||||
|
||||
<head/>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>Datenbank</h1>
|
||||
|
||||
<h2>Antworten</h2>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>Frage #</th>
|
||||
<th>Anzahl</th>
|
||||
</tr>
|
||||
<tr py:for="question in Question.select().orderBy('weight')">
|
||||
<td>${question.weight}</td>
|
||||
<td>${Answer.selectBy(question=question, option=Option.select()[0]).count()}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Sitzungen</h2>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>Sitzung #</th>
|
||||
<th>Datum</th>
|
||||
<th>Fragen</th>
|
||||
<th>versandt</th>
|
||||
<th>Standard?</th>
|
||||
</tr>
|
||||
<tr py:for="session in Session.select().orderBy('created')">
|
||||
<td>${session.id}</td>
|
||||
<td>${session.created}</td>
|
||||
<td>${Answer.selectBy(session=session).count()}</td>
|
||||
<td>${Submission.selectBy(session=session).count() > 0}</td>
|
||||
<td>${Submission.selectBy(session=session, to_default_destination=True).count() > 0}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue