Anpassungen des Codes an Django 1.11 mit Python 3

Grapelli wurde entfernt, das neue Django Admin ist hübsch genug.
This commit is contained in:
2017-05-10 10:15:39 +02:00
parent 5437b7b8de
commit 321531c160
25 changed files with 219 additions and 121 deletions

View File

@@ -1,10 +1,9 @@
# -*- encoding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf.urls import url
from django.views.generic import RedirectView
from .views import *
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', RedirectView.as_view(url='/events/upcoming/', permanent=True)),
url(r'^(?P<year>[\d]{4})/$', EventArchiveYear.as_view(),
name='event-archive'),
@@ -19,4 +18,4 @@ urlpatterns = patterns(
url(r'^add/$', EventForm.as_view(), name='event-form'),
url(r'^archive/$', EventArchiveIndex.as_view(), name='event-archive'),
url(r'^upcoming/$', UpcomingEvents.as_view(), name='upcoming-events'),
)
]