Switch to path, use re_path only when really needed

This commit is contained in:
Peter Pfeufer
2022-02-02 15:09:48 +01:00
parent fd442a5735
commit 640a21e4db
24 changed files with 187 additions and 186 deletions

View File

@@ -1,5 +1,5 @@
from django.conf.urls import include
from django.urls import re_path
from django.urls import path
from . import views
@@ -7,19 +7,19 @@ app_name = 'teamspeak3'
module_urls = [
# Teamspeak3 service control
re_path(r'^activate/$', views.activate_teamspeak3, name='activate'),
re_path(r'^deactivate/$', views.deactivate_teamspeak3, name='deactivate'),
re_path(r'^reset_perm/$', views.reset_teamspeak3_perm, name='reset_perm'),
re_path(
r'^admin_update_ts3_groups/$',
path('activate/', views.activate_teamspeak3, name='activate'),
path('deactivate/', views.deactivate_teamspeak3, name='deactivate'),
path('reset_perm/', views.reset_teamspeak3_perm, name='reset_perm'),
path(
'admin_update_ts3_groups/',
views.admin_update_ts3_groups,
name='admin_update_ts3_groups'
),
# Teamspeak Urls
re_path(r'^verify/$', views.verify_teamspeak3, name='verify'),
path('verify/', views.verify_teamspeak3, name='verify'),
]
urlpatterns = [
re_path(r'^teamspeak3/', include((module_urls, app_name), namespace=app_name)),
path('teamspeak3/', include((module_urls, app_name), namespace=app_name)),
]