Add vocabulary page
This commit is contained in:
parent
ae7ea8004f
commit
cb8a780548
10
booking/templates/booking/vocabulary.html
Normal file
10
booking/templates/booking/vocabulary.html
Normal 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 %}
|
@ -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
9
booking/tests.py
Normal 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
11
booking/urls.py
Normal 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'
|
||||||
|
),
|
||||||
|
)
|
@ -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')),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user