diff --git a/helpdesk/models.py b/helpdesk/models.py index d86ec7dd..86682f85 100644 --- a/helpdesk/models.py +++ b/helpdesk/models.py @@ -539,7 +539,7 @@ class Ticket(models.Model): return '%s %s' % (self.id, self.title) def get_absolute_url(self): - return ('helpdesk_view', (self.id,)) + return ('helpdesk:view', (self.id,)) get_absolute_url = models.permalink(get_absolute_url) def save(self, *args, **kwargs): @@ -928,7 +928,7 @@ class KBCategory(models.Model): verbose_name_plural = _('Knowledge base categories') def get_absolute_url(self): - return ('helpdesk_kb_category', (), {'slug': self.slug}) + return ('kb_category', (), {'slug': self.slug}) get_absolute_url = models.permalink(get_absolute_url) @@ -996,7 +996,7 @@ class KBItem(models.Model): verbose_name_plural = _('Knowledge base items') def get_absolute_url(self): - return ('helpdesk_kb_item', (self.id,)) + return ('helpdesk:kb_item', (self.id,)) get_absolute_url = models.permalink(get_absolute_url) diff --git a/helpdesk/tests/test_navigation.py b/helpdesk/tests/test_navigation.py index c2ed10bd..4ea6567f 100644 --- a/helpdesk/tests/test_navigation.py +++ b/helpdesk/tests/test_navigation.py @@ -26,11 +26,11 @@ class TestKBDisabled(TestCase): from django.core.urlresolvers import NoReverseMatch self.client.login(username=get_staff_user().get_username(), password='password') - self.assertRaises(NoReverseMatch, reverse, 'helpdesk_kb_index') + self.assertRaises(NoReverseMatch, reverse, 'helpdesk:kb_index') try: response = self.client.get(reverse('helpdesk:dashboard')) except NoReverseMatch as e: - if 'helpdesk_kb_index' in e.message: + if 'helpdesk:kb_index' in e.message: self.fail("Please verify any unchecked references to helpdesk_kb_index (start with navigation.html)") else: raise diff --git a/helpdesk/tests/urls.py b/helpdesk/tests/urls.py new file mode 100644 index 00000000..12553ec3 --- /dev/null +++ b/helpdesk/tests/urls.py @@ -0,0 +1,5 @@ +from django.conf.urls import include, url + +urlpatterns = [ + url(r'^helpdesk/', include('helpdesk.urls', namespace='helpdesk')), +] diff --git a/quicktest.py b/quicktest.py index 381c567b..723605a7 100644 --- a/quicktest.py +++ b/quicktest.py @@ -90,7 +90,7 @@ class QuickDjangoTest(object): }, INSTALLED_APPS = self.INSTALLED_APPS + self.apps, MIDDLEWARE_CLASSES = self.MIDDLEWARE_CLASSES, - ROOT_URLCONF = self.apps[0] + '.urls', + ROOT_URLCONF = 'tests.urls', STATIC_URL = '/static/' )