mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-08 00:54:06 +01:00
Bump version to 0.2.6 to fix remaining Django 2.0 warnings
This commit is contained in:
parent
5112f0dfd0
commit
d18ce1f1d5
@ -13,7 +13,7 @@ project_root = os.path.dirname(here)
|
||||
NAME = 'django-helpdesk-demodesk'
|
||||
DESCRIPTION = 'A demo Django project using django-helpdesk'
|
||||
README = open(os.path.join(here, 'README.rst')).read()
|
||||
VERSION = '0.2.5'
|
||||
VERSION = '0.2.6'
|
||||
#VERSION = open(os.path.join(project_root, 'VERSION')).read().strip()
|
||||
AUTHOR = 'django-helpdesk team'
|
||||
URL = 'https://github.com/django-helpdesk/django-helpdesk'
|
||||
|
@ -1,6 +1,6 @@
|
||||
from functools import wraps
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.http import HttpResponseRedirect, Http404
|
||||
from django.utils.decorators import available_attrs
|
||||
|
||||
|
@ -11,7 +11,7 @@ forms.py - Definitions of newforms-based forms for creating and maintaining
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.utils.six import StringIO
|
||||
from django import forms
|
||||
from django.forms import extras
|
||||
from django.forms import widgets
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.contrib.auth import get_user_model
|
||||
|
@ -528,7 +528,7 @@ class Ticket(models.Model):
|
||||
"""
|
||||
from django.contrib.sites.models import Site
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
try:
|
||||
site = Site.objects.get_current()
|
||||
except ImproperlyConfigured:
|
||||
@ -548,7 +548,7 @@ class Ticket(models.Model):
|
||||
"""
|
||||
from django.contrib.sites.models import Site
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
try:
|
||||
site = Site.objects.get_current()
|
||||
except ImproperlyConfigured:
|
||||
@ -581,8 +581,8 @@ class Ticket(models.Model):
|
||||
return '%s %s' % (self.id, self.title)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return 'helpdesk:view', (self.id,)
|
||||
get_absolute_url = models.permalink(get_absolute_url)
|
||||
from django.urls import reverse
|
||||
return reverse('helpdesk:view', args=(self.id,))
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if not self.id:
|
||||
@ -970,8 +970,8 @@ class KBCategory(models.Model):
|
||||
verbose_name_plural = _('Knowledge base categories')
|
||||
|
||||
def get_absolute_url(self):
|
||||
return 'helpdesk:kb_category', (), {'slug': self.slug}
|
||||
get_absolute_url = models.permalink(get_absolute_url)
|
||||
from django.urls import reverse
|
||||
return reverse('helpdesk:kb_category', kwargs={'slug': self.slug})
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
@ -1038,8 +1038,8 @@ class KBItem(models.Model):
|
||||
verbose_name_plural = _('Knowledge base items')
|
||||
|
||||
def get_absolute_url(self):
|
||||
return 'helpdesk:kb_item', (self.id,)
|
||||
get_absolute_url = models.permalink(get_absolute_url)
|
||||
from django.urls import reverse
|
||||
return reverse('helpdesk:kb_item', args=(self.id,))
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
|
@ -14,7 +14,7 @@ templatetags/ticket_to_link.py - Used in ticket comments to allow wiki-style
|
||||
import re
|
||||
|
||||
from django import template
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
from helpdesk.models import Ticket
|
||||
|
@ -20,7 +20,7 @@ def get_staff_user(username='helpdesk.staff', password='password'):
|
||||
|
||||
def reload_urlconf(urlconf=None):
|
||||
|
||||
from imp import reload # python 3 needs this import.
|
||||
from importlib import reload # python 3 needs this import.
|
||||
|
||||
if urlconf is None:
|
||||
from django.conf import settings
|
||||
@ -33,7 +33,7 @@ def reload_urlconf(urlconf=None):
|
||||
if urlconf in sys.modules:
|
||||
reload(sys.modules[urlconf])
|
||||
|
||||
from django.core.urlresolvers import clear_url_caches
|
||||
from django.urls import clear_url_caches
|
||||
clear_url_caches()
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ import shutil
|
||||
from tempfile import gettempdir
|
||||
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.test import override_settings, TestCase
|
||||
from django.utils.encoding import smart_text
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.test import TestCase
|
||||
|
||||
from helpdesk.tests.helpers import get_staff_user, reload_urlconf
|
||||
@ -23,7 +23,7 @@ class TestKBDisabled(TestCase):
|
||||
|
||||
def test_navigation(self):
|
||||
"""Test proper rendering of navigation.html by accessing the dashboard"""
|
||||
from django.core.urlresolvers import NoReverseMatch
|
||||
from django.urls import NoReverseMatch
|
||||
|
||||
self.client.login(username=get_staff_user().get_username(), password='password')
|
||||
self.assertRaises(NoReverseMatch, reverse, 'helpdesk:kb_index')
|
||||
|
@ -1,6 +1,6 @@
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.contrib.auth.models import Permission
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.test import TestCase
|
||||
from django.test.client import Client
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
from helpdesk.models import Queue, Ticket
|
||||
from django.test import TestCase
|
||||
from django.test.client import Client
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
|
||||
|
||||
class PublicActionsTestCase(TestCase):
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.test import TestCase
|
||||
from helpdesk.models import Queue
|
||||
from helpdesk.tests.helpers import get_staff_user
|
||||
|
@ -1,6 +1,6 @@
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.core import mail
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.test import TestCase
|
||||
from django.test.client import Client
|
||||
from helpdesk.models import CustomField, Queue, Ticket
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.test import TestCase
|
||||
from helpdesk.models import Ticket, Queue
|
||||
|
||||
|
@ -2,7 +2,7 @@ from helpdesk.models import Queue, CustomField, Ticket
|
||||
from django.test import TestCase
|
||||
from django.core import mail
|
||||
from django.test.client import Client
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
|
||||
try: # python 3
|
||||
from urllib.parse import urlparse
|
||||
|
@ -1,6 +1,6 @@
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.core import mail
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.test import TestCase
|
||||
from django.test.client import Client
|
||||
from helpdesk.models import CustomField, Queue, Ticket
|
||||
|
@ -9,7 +9,7 @@ views/feeds.py - A handful of staff-only RSS feeds to provide ticket details
|
||||
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.contrib.syndication.views import Feed
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.db.models import Q
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.shortcuts import get_object_or_404
|
||||
|
@ -7,7 +7,7 @@ views/public.py - All public facing views, eg non-staff (no authentication
|
||||
required) views.
|
||||
"""
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.shortcuts import render
|
||||
from django.utils.http import urlquote
|
||||
|
@ -12,7 +12,7 @@ from datetime import datetime, timedelta
|
||||
from django.conf import settings
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.contrib.auth.decorators import user_passes_test
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.urls import reverse
|
||||
from django.core.exceptions import ValidationError, PermissionDenied
|
||||
from django.db import connection
|
||||
from django.db.models import Q
|
||||
|
Loading…
Reference in New Issue
Block a user