use django3.2-compatible re_path urls util (#64309)
This commit is contained in:
parent
509beeb6c4
commit
b4704b16c9
|
@ -1,11 +1,11 @@
|
|||
import django
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url('login/$', views.login, name='mellon_login'),
|
||||
url('login/debug/$', views.debug_login, name='mellon_debug_login'),
|
||||
url('logout/$', views.logout, name='mellon_logout'),
|
||||
url('metadata/$', views.metadata, name='mellon_metadata'),
|
||||
re_path('login/$', views.login, name='mellon_login'),
|
||||
re_path('login/debug/$', views.debug_login, name='mellon_debug_login'),
|
||||
re_path('logout/$', views.logout, name='mellon_logout'),
|
||||
re_path('metadata/$', views.metadata, name='mellon_metadata'),
|
||||
]
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.conf.urls import include, url
|
||||
from django.http import HttpResponse
|
||||
from django.urls import include, re_path
|
||||
|
||||
|
||||
def homepage(request):
|
||||
|
@ -22,6 +22,6 @@ def homepage(request):
|
|||
|
||||
|
||||
urlpatterns = [
|
||||
url('^', include('mellon.urls')),
|
||||
url('^$', homepage, name='homepage'),
|
||||
re_path('^', include('mellon.urls')),
|
||||
re_path('^$', homepage, name='homepage'),
|
||||
]
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.conf.urls import include, url
|
||||
from django.http import HttpResponse
|
||||
from django.urls import include, re_path
|
||||
|
||||
|
||||
def homepage(request):
|
||||
|
@ -22,6 +22,6 @@ def homepage(request):
|
|||
|
||||
|
||||
urlpatterns = [
|
||||
url('^', include('mellon.urls'), kwargs={'template_base': 'theme.html'}),
|
||||
url('^$', homepage, name='homepage'),
|
||||
re_path('^', include('mellon.urls'), kwargs={'template_base': 'theme.html'}),
|
||||
re_path('^$', homepage, name='homepage'),
|
||||
]
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.conf.urls import include, url
|
||||
from django.http import HttpResponse
|
||||
from django.urls import include, re_path
|
||||
|
||||
|
||||
def homepage(request):
|
||||
|
@ -26,7 +26,7 @@ def context_hook(context):
|
|||
|
||||
|
||||
urlpatterns = [
|
||||
url(
|
||||
re_path(
|
||||
'^',
|
||||
include('mellon.urls'),
|
||||
kwargs={
|
||||
|
@ -34,5 +34,5 @@ urlpatterns = [
|
|||
'context_hook': context_hook,
|
||||
},
|
||||
),
|
||||
url('^$', homepage, name='homepage'),
|
||||
re_path('^$', homepage, name='homepage'),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue