Commit 998decd5 authored by Daniel Klaffenbach's avatar Daniel Klaffenbach 🐍
Browse files

Drop legacy imports

This is required for Django 3.x+
parent e58bbab1
Pipeline #51616 failed with stage
in 11 seconds
......@@ -3,7 +3,6 @@ from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.test import Client, TestCase
from django.urls import reverse
from django.utils import six
class Tuc2014TestCase(TestCase):
......@@ -16,7 +15,7 @@ class Tuc2014TestCase(TestCase):
response = self.client.get('/')
self.assertEquals(response.status_code, 200)
self.assertTrue(self.CONTENT_BLOCK in six.text_type(response.content, "utf-8"))
self.assertTrue(self.CONTENT_BLOCK in str(response.content, "utf-8"))
def test_admin(self):
user = User.objects.create_superuser(username="test", email="", password="test")
from django.conf.urls import url
from django.urls import re_path
from django.contrib import admin
from .views import index
urlpatterns = [
url(r'^$', index),
re_path(r'^$', index),
......@@ -2,11 +2,7 @@
from __future__ import unicode_literals
import datetime
from django.conf import settings
# Available in Django 1.10+
from django.urls import reverse
except ImportError:
from django.core.urlresolvers import reverse
from django.urls import reverse
def tucal(request):
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import include, url
from django.urls import include, re_path
from .views import change_language
app_name = 'tuc2014'
urlpatterns = [
url(r'^i18n/', include(('django.conf.urls.i18n', 'djangoi18n'), namespace='djangoi18n')),
url(r'^$', change_language, name='change_language')
re_path(r'^i18n/', include(('django.conf.urls.i18n', 'djangoi18n'), namespace='djangoi18n')),
re_path(r'^$', change_language, name='change_language')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment