list_display = ['title', 'quiz']
+class ResultAdmin(admin.ModelAdmin):
+ list_display = ['title', 'quiz']
+
+
+class QuizAdmin(admin.ModelAdmin):
+ list_display = ['name']
+
+
+
admin.site.register(Question, QuestionAdmin)
-admin.site.register(Result)
-admin.site.register(Quiz)
+admin.site.register(Result, ResultAdmin)
+admin.site.register(Quiz, QuizAdmin)
msgstr ""
"Project-Id-Version: Quiz 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-09-20 17:10+0200\n"
-"PO-Revision-Date: 2011-09-20 17:10+0100\n"
+"POT-Creation-Date: 2011-09-26 10:15+0200\n"
+"PO-Revision-Date: 2011-09-26 10:16+0100\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: forms.py:9
msgid "Please select an option"
msgstr "Proszę wybrać jedną z odpowiedzi"
-#: models.py:11
+#: models.py:12
msgid "quiz"
msgstr "quiz"
-#: models.py:12
+#: models.py:13
msgid "quizzes"
msgstr "quizy"
-#: models.py:40
+#: models.py:41
msgid "result"
msgstr "rezultat"
-#: models.py:41
+#: models.py:42
msgid "results"
msgstr "rezultaty"
-#: models.py:60
+#: models.py:61
msgid "question"
msgstr "pytanie"
-#: models.py:61
+#: models.py:62
msgid "questions"
msgstr "pytania"
-#: models.py:90
+#: models.py:91
msgid "answer"
msgstr "odpowiedź"
-#: models.py:91
+#: models.py:92
msgid "answers"
msgstr "odpowiedzi"
-#: templates/quiz/question_detail.html:26 templates/quiz/result_detail.html:20
+#: templates/quiz/question_detail.html:30
+msgid "Send answer"
+msgstr "Wyślij odpowiedź"
+
+#: templates/quiz/question_detail.html:33
+#: templates/quiz/result_detail.html:24
msgid "Back to last question"
msgstr "Wróć do poprzedniego pytania"
-#: templates/quiz/question_detail.html:31 templates/quiz/result_detail.html:24
+#: templates/quiz/question_detail.html:38
+#: templates/quiz/result_detail.html:28
msgid "Back to my test"
msgstr "Wróć do testu"
-#: templates/quiz/question_detail.html:33 templates/quiz/result_detail.html:26
+#: templates/quiz/question_detail.html:40
+#: templates/quiz/result_detail.html:33
msgid "Start from the beginning"
msgstr "Zacznij od początku"
-#: templates/quiz/result_detail.html:32
-msgid "Start again"
-msgstr "Jeszcze raz od początku"
+#~ msgid "Start again"
+#~ msgstr "Jeszcze raz od początku"
class Meta:
verbose_name = _('result')
verbose_name_plural = _('results')
+ ordering = ['quiz', 'title']
def __unicode__(self):
return self.title
button {
background: #999;
color: white;
+ font-size: 1em;
padding: 1em;
text-decoration:none;
border: 1px solid #ddd;
background: #aaa;
}
-a.big-button {
+a.big-button, a.button {
background: #999;
color: white;
- padding: 1em;
text-decoration:none;
border: 1px solid #ddd;
border-radius: 1em;
margin-top: 1em;
}
-a.big-button:hover {
+a.button {
+ padding: .3em;
+}
+
+a.big-button {
+ padding: 1em;
+}
+
+a.big-button:hover, a.button:hover {
background: #aaa;
}
<h2>{{ question.title }}</h2>
-<div>
-{{ question.text|safe }}
-</div>
+{% if question.test %}
+ <div>
+ {{ question.text|safe }}
+ </div>
+{% endif %}
<div>
{% else %}
{% if valid_url %}
- <a class='big-button' href='{{ valid_url }}'>{% trans "Back to my test" %}</a>
+ <a class='button' href='{{ valid_url }}'>{% trans "Back to my test" %}</a>
{% else %}
- <a class='big-button' href='{% url "quiz" %}'>{% trans "Start from the beginning" %}</a>
+ <a class='button' href='{% url "quiz" %}'>{% trans "Start from the beginning" %}</a>
{% endif %}
{% endif %}
</div>
-<div id='description'>
-{{ question.description|safe }}
-</div>
+{% if question.description %}
+ <div id='description'>
+ {{ question.description|safe }}
+ </div>
+{% endif %}
{% endblock %}
<h2>{{ result.title }}</h2>
-<div>
-{{ result.text|safe }}
-</div>
+{% if result.text %}
+ <div>
+ {{ result.text|safe }}
+ </div>
+{% endif %}
{% if valid %}
{% if previous_url %}
- <a class='big-button' href='{{ previous_url }}'>{% trans "Back to last question" %}</a>
+ <a class='button' href='{{ previous_url }}'>{% trans "Back to last question" %}</a>
{% endif %}
{% else %}
{% if valid_url %}
- <a class='big-button' href='{{ valid_url }}'>{% trans "Back to my test" %}</a>
+ <a class='button' href='{{ valid_url }}'>{% trans "Back to my test" %}</a>
{% endif %}
{% endif %}
-<a class='big-button' href='{% url "quiz" %}'>{% trans "Start from the beginning" %}</a>
+<a class='button' href='{% url "quiz" %}'>{% trans "Start from the beginning" %}</a>
{% endblock %}
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-09-26 10:17+0200\n"
+"PO-Revision-Date: 2011-09-26 10:17+0100\n"
+"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
+
+#: templates/home.html:15
+msgid "Start quiz!"
+msgstr "Rozpocznij quiz!"
+
{% extends "base.html" %}
+{% load i18n %}
{% block "title" %}{{ quiz.name }}{% endblock %}
{{ quiz.description|safe }}
</div>
-<a class='big-button' href="{{ quiz.get_absolute_url }}">Start quiz!</a>
+<a class='big-button' href="{{ quiz.get_absolute_url }}">{% trans "Start quiz!" %}</a>
{% endblock %}