Skip to content

Commit

Permalink
Merge pull request #307 from PetrDlouhy/django40
Browse files Browse the repository at this point in the history
fix for Django 4.0
  • Loading branch information
idlesign committed Dec 17, 2021
2 parents ca39685 + 44f9ba4 commit d464a56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sitetree/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django import forms
from django.conf import settings as django_settings
from django.conf.urls import re_path
from django.urls import re_path, path
from django.contrib import admin
from django.contrib import messages
from django.contrib.admin.sites import NotRegistered
Expand Down Expand Up @@ -330,7 +330,7 @@ def get_urls(self):
prefix_change = 'change/'

sitetree_urls = [
re_path(r'^change/$', redirects_handler, name=get_tree_item_url_name('changelist')),
path('change/', redirects_handler, name=get_tree_item_url_name('changelist')),

re_path(fr'^((?P<tree_id>\d+)/)?{prefix_change}item_add/$',
self.admin_site.admin_view(self.tree_admin.item_add), name=get_tree_item_url_name('add')),
Expand All @@ -352,7 +352,7 @@ def get_urls(self):
]
if SMUGGLER_INSTALLED:
sitetree_urls += (
re_path(r'^dump_all/$', self.admin_site.admin_view(self.dump_view), name='sitetree_dump'),
path('dump_all/', self.admin_site.admin_view(self.dump_view), name='sitetree_dump'),
)

return sitetree_urls + urls
Expand Down

0 comments on commit d464a56

Please sign in to comment.