Skip to content

Commit

Permalink
no need to use re_path
Browse files Browse the repository at this point in the history
  • Loading branch information
jsocol committed Dec 5, 2023
1 parent 5fd8017 commit 535a95d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adminplus/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Any, Callable, NewType, Sequence, Union

from django.contrib.admin.sites import AdminSite
from django.urls import URLPattern, URLResolver, path, re_path
from django.urls import URLPattern, URLResolver, path
from django.utils.text import capfirst
from django.views.generic import View

Expand Down Expand Up @@ -57,7 +57,7 @@ def get_urls(self) -> Sequence[Union[URLPattern, URLResolver]]:
urls: list[Union[URLPattern, URLResolver]] = super().get_urls()
for av in self.custom_views:
urls.insert(
0, re_path('^%s$' % av.path, self.admin_view(av.view), name=av.urlname))
0, path(av.path, self.admin_view(av.view), name=av.urlname))
return urls

def index(self, request, extra_context=None):
Expand Down

0 comments on commit 535a95d

Please sign in to comment.