Django 2.1
authorRadek Czajka <rczajka@rczajka.pl>
Wed, 9 Jan 2019 13:18:53 +0000 (14:18 +0100)
committerRadek Czajka <rczajka@rczajka.pl>
Wed, 9 Jan 2019 13:18:53 +0000 (14:18 +0100)
requirements.txt
src/accounts/tests.py
src/cas/settings.py
src/cas/urls.py

index 5f7fa3e..f64af1b 100644 (file)
@@ -1,8 +1,8 @@
 -i https://py.mdrn.pl:8443/simple
 
-Django>=1.8,<1.9
+Django>=2.1,<2.2
 lxml>=2.2
 django-gravatar2
 Pillow
 
--e git+https://github.com/rczajka/django-cas-provider.git@f3c49c09dc7b2a7ccee36b897b9056a9622e0c02#egg=django-cas-provider
+-e git+https://github.com/fnp/django-cas-provider.git@fdbd98e576514c2a58183132369dccfb5781804a#egg=django-cas-provider
index 2247054..e69de29 100644 (file)
@@ -1,23 +0,0 @@
-"""
-This file demonstrates two different styles of tests (one doctest and one
-unittest). These will both pass when you run "manage.py test".
-
-Replace these with more appropriate tests for your application.
-"""
-
-from django.test import TestCase
-
-class SimpleTest(TestCase):
-    def test_basic_addition(self):
-        """
-        Tests that 1 + 1 always equals 2.
-        """
-        self.failUnlessEqual(1 + 1, 2)
-
-__test__ = {"doctest": """
-Another way to test that 1 + 1 is equal to 2.
-
->>> 1 + 1 == 2
-True
-"""}
-
index a4c4137..1883595 100644 (file)
@@ -26,7 +26,7 @@ DATABASES = {
 # although not all choices may be available on all operating systems.
 # If running in a Windows environment this must be set to the same as your
 # system time zone.
-TIME_ZONE = None
+TIME_ZONE = 'UTC'
 
 # Language code for this installation. All choices can be found here:
 # http://www.i18nguy.com/unicode/language-identifiers.html
@@ -98,12 +98,11 @@ INSTALLED_APPS = (
     'accounts',
 )
 
-MIDDLEWARE_CLASSES = (
+MIDDLEWARE = (
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
-    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.clickjacking.XFrameOptionsMiddleware',
 )
index 9db4e41..2d44e70 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from django.conf.urls import include, url
+from django.urls import path, include
 from django.views.generic import RedirectView
 from django.contrib import admin
 from django.conf import settings
@@ -7,23 +7,23 @@ from django.conf import settings
 admin.autodiscover()
 
 urlpatterns = [
-    url(r'^$', RedirectView.as_view(url='/accounts/', permanent=False)),
+    path('', RedirectView.as_view(url='/accounts/', permanent=False)),
 
     # django-cas-provider
-    url(r'^cas/', include('cas_provider.urls')),
+    path('cas/', include('cas_provider.urls')),
 
     # Admin panel
-    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
-    url(r'^admin/', include(admin.site.urls)),
+    path('admin/doc/', include('django.contrib.admindocs.urls')),
+    path('admin/', admin.site.urls),
 
-    url(r'^accounts/', include('accounts.urls')),
+    path('accounts/', include('accounts.urls')),
 ]
 
 
 if settings.DEBUG:
     from django.views.static import serve
     urlpatterns += [
-        url(r'^media/(?P<path>.*)$', serve, {
+        path('media/<path>', serve, {
             'document_root': settings.MEDIA_ROOT,
         }),
    ]