Skip to content

Commit 3074dbb

Browse files
committed
upgrade to nixos-23.11 fix import django.conf.urls with django 4
1 parent 958976c commit 3074dbb

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

demockrazy/urls.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from django.conf.urls import include, url
1+
from django.urls import include, re_path
22
from django.contrib import admin
33
from django.views.generic.base import RedirectView
44

55
urlpatterns = [
6-
url(r'^$', RedirectView.as_view(url="vote/", permanent=False)),
7-
url(r'^vote/', include('vote.urls')),
8-
url(r'^admin/', admin.site.urls),
6+
re_path(r'^$', RedirectView.as_view(url="vote/", permanent=False)),
7+
re_path(r'^vote/', include('vote.urls')),
8+
re_path(r'^admin/', admin.site.urls),
99
]

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vote/urls.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
from django.conf.urls import include, url
1+
from django.urls import include, re_path
22

33
from . import views
44

55
app_name = 'vote'
66

77
pollpatterns = ([
8-
url(r'^$', views.poll, name='poll'),
9-
url(r'^vote$', views.vote, name='vote'),
10-
url(r'^success$', views.success, name='success'),
11-
url(r'^manage$', views.manage, name='manage'),
12-
url(r'^results$', views.results, name='result'),
8+
re_path(r'^$', views.poll, name='poll'),
9+
re_path(r'^vote$', views.vote, name='vote'),
10+
re_path(r'^success$', views.success, name='success'),
11+
re_path(r'^manage$', views.manage, name='manage'),
12+
re_path(r'^results$', views.results, name='result'),
1313
], 'polls')
1414

1515
urlpatterns = [
16-
url(r'^$', views.index, name='index'),
17-
url(r'^create$', views.create, name='create'),
18-
url(r'^(?P<poll_identifier>[a-zA-Z0-9]+)/', include(pollpatterns)),
16+
re_path(r'^$', views.index, name='index'),
17+
re_path(r'^create$', views.create, name='create'),
18+
re_path(r'^(?P<poll_identifier>[a-zA-Z0-9]+)/', include(pollpatterns)),
1919
]

0 commit comments

Comments
 (0)