-"""
-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
-"""}
-
# 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
'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',
)
# -*- 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
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,
}),
]