Skip to content

Commit

Permalink
upgrade to nixos-23.11 fix import django.conf.urls with django 4
Browse files Browse the repository at this point in the history
  • Loading branch information
calbrecht committed Feb 8, 2024
1 parent 958976c commit 3074dbb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions demockrazy/urls.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from django.conf.urls import include, url
from django.urls import include, re_path
from django.contrib import admin
from django.views.generic.base import RedirectView

urlpatterns = [
url(r'^$', RedirectView.as_view(url="vote/", permanent=False)),
url(r'^vote/', include('vote.urls')),
url(r'^admin/', admin.site.urls),
re_path(r'^$', RedirectView.as_view(url="vote/", permanent=False)),
re_path(r'^vote/', include('vote.urls')),
re_path(r'^admin/', admin.site.urls),
]
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions vote/urls.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from django.conf.urls import include, url
from django.urls import include, re_path

from . import views

app_name = 'vote'

pollpatterns = ([
url(r'^$', views.poll, name='poll'),
url(r'^vote$', views.vote, name='vote'),
url(r'^success$', views.success, name='success'),
url(r'^manage$', views.manage, name='manage'),
url(r'^results$', views.results, name='result'),
re_path(r'^$', views.poll, name='poll'),
re_path(r'^vote$', views.vote, name='vote'),
re_path(r'^success$', views.success, name='success'),
re_path(r'^manage$', views.manage, name='manage'),
re_path(r'^results$', views.results, name='result'),
], 'polls')

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

0 comments on commit 3074dbb

Please sign in to comment.