diff --git a/api/tests.py b/api/tests.py
index 69e4781..9e1c1bd 100644
--- a/api/tests.py
+++ b/api/tests.py
@@ -1,5 +1,4 @@
from django.test import TestCase, Client
-from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django.conf import settings
@@ -16,14 +15,6 @@ def get_response_encoding(response):
return encoding
-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)
-
class ApiTest(TestCase):
def setUp(self):
self.client = Client()
diff --git a/api/urls.py b/api/urls.py
index 99b437c..b626ee7 100644
--- a/api/urls.py
+++ b/api/urls.py
@@ -1,16 +1,9 @@
from django.conf.urls import patterns, url
-from django.views.decorators.cache import cache_page
-from django_js_reverse.views import urls_js
from . import views
urlpatterns = patterns(
'',
- url(
- r'^reverse.js$',
- cache_page(3600)(urls_js),
- name = 'js_reverse'
- ),
url(
r'^duck/book/$',
views.duck_book,
diff --git a/booking/templates/front_template.html b/booking/templates/front_template.html
index fb910de..9a3fd87 100644
--- a/booking/templates/front_template.html
+++ b/booking/templates/front_template.html
@@ -7,7 +7,7 @@
-
+
diff --git a/booking/tests.py b/booking/tests.py
index 5a7a10e..b36b23a 100644
--- a/booking/tests.py
+++ b/booking/tests.py
@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
-from django.test import TestCase, Client
-from django.utils import timezone
from django.conf import settings
from django.contrib.auth.models import User
+from django.core.urlresolvers import reverse
+from django.test import TestCase, Client
+from django.utils import timezone
import datetime
@@ -296,3 +297,11 @@ class BookingTest(TestCase):
def test_unbooked_duck(self):
self.assertEqual(self.unbooked_duck.booked_by(), None)
+
+class ReverseTest(TestCase):
+ def setUp(self):
+ self.client = Client()
+
+ def test_reverse_js(self):
+ response = self.client.get(reverse('js_reverse'))
+ self.assertEqual(response.status_code, 200)
diff --git a/duckbook/urls.py b/duckbook/urls.py
index d7cf217..67af7c1 100644
--- a/duckbook/urls.py
+++ b/duckbook/urls.py
@@ -1,6 +1,9 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf import settings
+from django.views.decorators.cache import cache_page
+
+from django_js_reverse.views import urls_js
admin.autodiscover()
@@ -11,6 +14,11 @@ urlpatterns = patterns(
'django.views.static.serve',
{'document_root': settings.STATIC_ROOT}
),
+ url(
+ r'^reverse.js$',
+ cache_page(3600)(urls_js),
+ name = 'js_reverse'
+ ),
url(r'^admin/', include(admin.site.urls)),
url(r'^accounts/', include('accounts.urls', namespace = 'accounts')),
url(r'^api/', include('api.urls', namespace = 'api')),