diff --git a/api/tests.py b/api/tests.py new file mode 100644 index 0000000..66d1f29 --- /dev/null +++ b/api/tests.py @@ -0,0 +1,10 @@ +from django.test import TestCase, Client +from django.core.urlresolvers import reverse + +class ReverseTest(TestCase): + def setUp(self): + self.client = Client() + + def test_reverse_js(self): + response = self.client.get(reverse('api:js_reverse')) + self.assertEqual(response.status_code, 200) diff --git a/api/urls.py b/api/urls.py index 82981ec..b6b6367 100644 --- a/api/urls.py +++ b/api/urls.py @@ -1,7 +1,8 @@ from django.conf.urls import patterns, url - -from . import views +from django.views.decorators.cache import cache_page +from django_js_reverse.views import urls_js urlpatterns = patterns( '', + url(r'^reverse.js$', cache_page(3600)(urls_js), name = 'js_reverse'), ) diff --git a/booking/templates/front_template.html b/booking/templates/front_template.html index 8617def..31022c6 100644 --- a/booking/templates/front_template.html +++ b/booking/templates/front_template.html @@ -2,6 +2,8 @@ Rubber Duck Booking Tool + +

Rubber Duck Booking Tool

diff --git a/duckbook/settings.py b/duckbook/settings.py index 16e50fd..e60867e 100644 --- a/duckbook/settings.py +++ b/duckbook/settings.py @@ -36,6 +36,7 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'django_js_reverse', 'accounts', 'booking', ) diff --git a/requirements.txt b/requirements.txt index d98884a..9c0dddd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ Django>=1.7,<1.8 WebTest==2.0.17 django-webtest==1.7.7 +django-js-reverse==0.3.3