Add vocabulary page

This commit is contained in:
Gergely Polonkai 2014-12-23 09:13:22 +01:00 committed by Gergely Polonkai
parent ae7ea8004f
commit cb8a780548
5 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,10 @@
{% extends 'front_template.html' %}
{% block body %}
<h2>Vocabulary</h2>
<dl>
<dt>Duck</dt>
<dd>Despite the name, <em>duck</em> refers to any rubber or plastic toy bookable in this app.</dd>
</dl>
{% endblock %}

View File

@ -6,6 +6,7 @@
<body> <body>
<h1>Rubber Duck Booking Tool</h1> <h1>Rubber Duck Booking Tool</h1>
<a href="{% url 'index' %}">Home</a> <a href="{% url 'index' %}">Home</a>
<a href="{% url 'booking:vocabulary' %}">Vocabulary</a>
{% block body %}{% endblock %} {% block body %}{% endblock %}
</body> </body>
</html> </html>

9
booking/tests.py Normal file
View File

@ -0,0 +1,9 @@
from django.test import TestCase, Client
class FrontTest(TestCase):
def setUp(self):
self.client = Client()
def test_vocabulary_page(self):
response = self.client.get('/vocabulary.html')
self.assertEqual(response.status_code, 200)

11
booking/urls.py Normal file
View File

@ -0,0 +1,11 @@
from django.conf.urls import patterns, url
from django.views.generic.base import TemplateView
urlpatterns = patterns(
'',
url(
r'^vocabulary.html$',
TemplateView.as_view(template_name = 'booking/vocabulary.html'),
name = 'vocabulary'
),
)

View File

@ -4,4 +4,5 @@ from django.views.generic import TemplateView
urlpatterns = patterns( urlpatterns = patterns(
'', '',
url('^$', TemplateView.as_view(template_name = 'front_template.html'), name = 'index'), url('^$', TemplateView.as_view(template_name = 'front_template.html'), name = 'index'),
url('', include('booking.urls', namespace = 'booking')),
) )