misc: apply django-upgrade (#69798)
This commit is contained in:
parent
70a00eb2f4
commit
3b0c9bb02c
|
@ -14,18 +14,18 @@
|
|||
# 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 url
|
||||
from django.urls import path, re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(
|
||||
re_path(
|
||||
r'^agenda/(?P<agenda_identifier>[\w-]+)/check-types/$',
|
||||
views.agenda_check_type_list,
|
||||
name='api-agenda-check-types',
|
||||
),
|
||||
url(
|
||||
r'^pricing/compute/$',
|
||||
path(
|
||||
'pricing/compute/',
|
||||
views.pricing_compute,
|
||||
name='api-pricing-compute',
|
||||
),
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
# 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 url
|
||||
from django.urls import path, re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.homepage, name='lingo-manager-homepage'),
|
||||
url(r'^menu.json$', views.menu_json),
|
||||
path('', views.homepage, name='lingo-manager-homepage'),
|
||||
re_path(r'^menu.json$', views.menu_json),
|
||||
]
|
||||
|
|
|
@ -14,248 +14,248 @@
|
|||
# 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 url
|
||||
from django.urls import path, re_path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.home, name='lingo-manager-pricing-home'),
|
||||
url(r'^import/$', views.config_import, name='lingo-manager-pricing-config-import'),
|
||||
url(r'^export/$', views.config_export, name='lingo-manager-pricing-config-export'),
|
||||
url(r'^models/$', views.pricing_list, name='lingo-manager-pricing-list'),
|
||||
url(
|
||||
r'^model/add/$',
|
||||
path('', views.home, name='lingo-manager-pricing-home'),
|
||||
path('import/', views.config_import, name='lingo-manager-pricing-config-import'),
|
||||
path('export/', views.config_export, name='lingo-manager-pricing-config-export'),
|
||||
path('models/', views.pricing_list, name='lingo-manager-pricing-list'),
|
||||
path(
|
||||
'model/add/',
|
||||
views.pricing_add,
|
||||
name='lingo-manager-pricing-add',
|
||||
),
|
||||
url(
|
||||
r'^model/(?P<pk>\d+)/$',
|
||||
path(
|
||||
'model/<int:pk>/',
|
||||
views.pricing_detail,
|
||||
name='lingo-manager-pricing-detail',
|
||||
),
|
||||
url(
|
||||
r'^model/(?P<pk>\d+)/edit/$',
|
||||
path(
|
||||
'model/<int:pk>/edit/',
|
||||
views.pricing_edit,
|
||||
name='lingo-manager-pricing-edit',
|
||||
),
|
||||
url(
|
||||
r'^model/(?P<pk>\d+)/delete/$',
|
||||
path(
|
||||
'model/<int:pk>/delete/',
|
||||
views.pricing_delete,
|
||||
name='lingo-manager-pricing-delete',
|
||||
),
|
||||
url(
|
||||
r'^model/(?P<pk>\d+)/duplicate/$',
|
||||
path(
|
||||
'model/<int:pk>/duplicate/',
|
||||
views.pricing_duplicate,
|
||||
name='lingo-manager-pricing-duplicate',
|
||||
),
|
||||
url(
|
||||
r'^model/(?P<pk>\d+)/export/$',
|
||||
path(
|
||||
'model/<int:pk>/export/',
|
||||
views.pricing_export,
|
||||
name='lingo-manager-pricing-export',
|
||||
),
|
||||
url(
|
||||
r'^model/(?P<pk>\d+)/variable/$',
|
||||
path(
|
||||
'model/<int:pk>/variable/',
|
||||
views.pricing_variable_edit,
|
||||
name='lingo-manager-pricing-variable-edit',
|
||||
),
|
||||
url(
|
||||
r'^model/(?P<pk>\d+)/category/add/$',
|
||||
path(
|
||||
'model/<int:pk>/category/add/',
|
||||
views.pricing_criteria_category_add,
|
||||
name='lingo-manager-pricing-criteria-category-add',
|
||||
),
|
||||
url(
|
||||
r'^model/(?P<pk>\d+)/category/(?P<category_pk>\d+)/edit/$',
|
||||
path(
|
||||
'model/<int:pk>/category/<int:category_pk>/edit/',
|
||||
views.pricing_criteria_category_edit,
|
||||
name='lingo-manager-pricing-criteria-category-edit',
|
||||
),
|
||||
url(
|
||||
r'^model/(?P<pk>\d+)/category/(?P<category_pk>\d+)/delete/$',
|
||||
path(
|
||||
'model/<int:pk>/category/<int:category_pk>/delete/',
|
||||
views.pricing_criteria_category_delete,
|
||||
name='lingo-manager-pricing-criteria-category-delete',
|
||||
),
|
||||
url(
|
||||
r'^model/(?P<pk>\d+)/order/$',
|
||||
path(
|
||||
'model/<int:pk>/order/',
|
||||
views.pricing_criteria_category_order,
|
||||
name='lingo-manager-pricing-criteria-category-order',
|
||||
),
|
||||
url(
|
||||
r'^criterias/$',
|
||||
path(
|
||||
'criterias/',
|
||||
views.criteria_list,
|
||||
name='lingo-manager-pricing-criteria-list',
|
||||
),
|
||||
url(
|
||||
r'^criteria/category/add/$',
|
||||
path(
|
||||
'criteria/category/add/',
|
||||
views.criteria_category_add,
|
||||
name='lingo-manager-pricing-criteria-category-add',
|
||||
),
|
||||
url(
|
||||
r'^criteria/category/(?P<pk>\d+)/edit/$',
|
||||
path(
|
||||
'criteria/category/<int:pk>/edit/',
|
||||
views.criteria_category_edit,
|
||||
name='lingo-manager-pricing-criteria-category-edit',
|
||||
),
|
||||
url(
|
||||
r'^criteria/category/(?P<pk>\d+)/delete/$',
|
||||
path(
|
||||
'criteria/category/<int:pk>/delete/',
|
||||
views.criteria_category_delete,
|
||||
name='lingo-manager-pricing-criteria-category-delete',
|
||||
),
|
||||
url(
|
||||
r'^criteria/category/(?P<pk>\d+)/export/$',
|
||||
path(
|
||||
'criteria/category/<int:pk>/export/',
|
||||
views.criteria_category_export,
|
||||
name='lingo-manager-pricing-criteria-category-export',
|
||||
),
|
||||
url(
|
||||
r'^criteria/category/(?P<pk>\d+)/order/$',
|
||||
path(
|
||||
'criteria/category/<int:pk>/order/',
|
||||
views.criteria_order,
|
||||
name='lingo-manager-pricing-criteria-order',
|
||||
),
|
||||
url(
|
||||
r'^criteria/category/(?P<category_pk>\d+)/add/$',
|
||||
path(
|
||||
'criteria/category/<int:category_pk>/add/',
|
||||
views.criteria_add,
|
||||
name='lingo-manager-pricing-criteria-add',
|
||||
),
|
||||
url(
|
||||
r'^criteria/category/(?P<category_pk>\d+)/(?P<pk>\d+)/edit/$',
|
||||
path(
|
||||
'criteria/category/<int:category_pk>/<int:pk>/edit/',
|
||||
views.criteria_edit,
|
||||
name='lingo-manager-pricing-criteria-edit',
|
||||
),
|
||||
url(
|
||||
r'^criteria/category/(?P<category_pk>\d+)/(?P<pk>\d+)/delete/$',
|
||||
path(
|
||||
'criteria/category/<int:category_pk>/<int:pk>/delete/',
|
||||
views.criteria_delete,
|
||||
name='lingo-manager-pricing-criteria-delete',
|
||||
),
|
||||
url(
|
||||
r'^agendas/sync/$',
|
||||
path(
|
||||
'agendas/sync/',
|
||||
views.agenda_sync,
|
||||
name='lingo-manager-agenda-sync',
|
||||
),
|
||||
url(
|
||||
r'^agendas/$',
|
||||
path(
|
||||
'agendas/',
|
||||
views.agenda_list,
|
||||
name='lingo-manager-agenda-list',
|
||||
),
|
||||
url(
|
||||
r'^agenda/(?P<pk>\d+)/$',
|
||||
path(
|
||||
'agenda/<int:pk>/',
|
||||
views.agenda_detail,
|
||||
name='lingo-manager-agenda-detail',
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r'^agenda/((?P<slug>[-_a-zA-Z0-9]+))/$',
|
||||
views.agenda_detail_redirect,
|
||||
name='lingo-manager-agenda-detail-redirect',
|
||||
),
|
||||
url(
|
||||
r'^agenda/(?P<pk>\d+)/export/$',
|
||||
path(
|
||||
'agenda/<int:pk>/export/',
|
||||
views.agenda_export,
|
||||
name='lingo-manager-agenda-export',
|
||||
),
|
||||
url(
|
||||
r'^agenda/(?P<pk>\d+)/check-options/$',
|
||||
path(
|
||||
'agenda/<int:pk>/check-options/',
|
||||
views.agenda_booking_check_settings,
|
||||
name='lingo-manager-agenda-booking-check-settings',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricings/$',
|
||||
path(
|
||||
'agenda-pricings/',
|
||||
views.agenda_pricing_list,
|
||||
name='lingo-manager-agenda-pricing-list',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/add/$',
|
||||
path(
|
||||
'agenda-pricing/add/',
|
||||
views.agenda_pricing_add,
|
||||
name='lingo-manager-agenda-pricing-add',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/$',
|
||||
path(
|
||||
'agenda-pricing/<int:pk>/',
|
||||
views.agenda_pricing_detail,
|
||||
name='lingo-manager-agenda-pricing-detail',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/edit/$',
|
||||
path(
|
||||
'agenda-pricing/<int:pk>/edit/',
|
||||
views.agenda_pricing_edit,
|
||||
name='lingo-manager-agenda-pricing-edit',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/delete/$',
|
||||
path(
|
||||
'agenda-pricing/<int:pk>/delete/',
|
||||
views.agenda_pricing_delete,
|
||||
name='lingo-manager-agenda-pricing-delete',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/export/$',
|
||||
path(
|
||||
'agenda-pricing/<int:pk>/export/',
|
||||
views.agenda_pricing_export,
|
||||
name='lingo-manager-agenda-pricing-export',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/test-tool/$',
|
||||
path(
|
||||
'agenda-pricing/<int:pk>/test-tool/',
|
||||
views.agenda_pricing_test_tool,
|
||||
name='lingo-manager-agenda-pricing-test-tool',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/agenda/add/$',
|
||||
path(
|
||||
'agenda-pricing/<int:pk>/agenda/add/',
|
||||
views.agenda_pricing_agenda_add,
|
||||
name='lingo-manager-agenda-pricing-agenda-add',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/agenda/(?P<agenda_pk>\d+)/delete/$',
|
||||
path(
|
||||
'agenda-pricing/<int:pk>/agenda/<int:agenda_pk>/delete/',
|
||||
views.agenda_pricing_agenda_delete,
|
||||
name='lingo-manager-agenda-pricing-agenda-delete',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/billing-date/add/$',
|
||||
path(
|
||||
'agenda-pricing/<int:pk>/billing-date/add/',
|
||||
views.agenda_pricing_billing_date_add,
|
||||
name='lingo-manager-agenda-pricing-billing-date-add',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/billing-date/(?P<billing_date_pk>\d+)/$',
|
||||
path(
|
||||
'agenda-pricing/<int:pk>/billing-date/<int:billing_date_pk>/',
|
||||
views.agenda_pricing_billing_date_edit,
|
||||
name='lingo-manager-agenda-pricing-billing-date-edit',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/billing-date/(?P<billing_date_pk>\d+)/delete/$',
|
||||
path(
|
||||
'agenda-pricing/<int:pk>/billing-date/<int:billing_date_pk>/delete/',
|
||||
views.agenda_pricing_billing_date_delete,
|
||||
name='lingo-manager-agenda-pricing-billing-date-delete',
|
||||
),
|
||||
url(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/matrix/edit/$',
|
||||
path(
|
||||
'agenda-pricing/<int:pk>/matrix/edit/',
|
||||
views.agenda_pricing_matrix_edit,
|
||||
name='lingo-manager-agenda-pricing-matrix-edit',
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r'^agenda-pricing/(?P<pk>\d+)/matrix/(?P<slug>[-_a-zA-Z0-9]+)/edit/$',
|
||||
views.agenda_pricing_matrix_edit,
|
||||
name='lingo-manager-agenda-pricing-matrix-slug-edit',
|
||||
),
|
||||
url(r'^check-types/$', views.check_type_list, name='lingo-manager-check-type-list'),
|
||||
url(
|
||||
r'^check-type/group/add/$',
|
||||
path('check-types/', views.check_type_list, name='lingo-manager-check-type-list'),
|
||||
path(
|
||||
'check-type/group/add/',
|
||||
views.check_type_group_add,
|
||||
name='lingo-manager-check-type-group-add',
|
||||
),
|
||||
url(
|
||||
r'^check-type/group/(?P<pk>\d+)/edit/$',
|
||||
path(
|
||||
'check-type/group/<int:pk>/edit/',
|
||||
views.check_type_group_edit,
|
||||
name='lingo-manager-check-type-group-edit',
|
||||
),
|
||||
url(
|
||||
r'^check-type/group/(?P<pk>\d+)/delete/$',
|
||||
path(
|
||||
'check-type/group/<int:pk>/delete/',
|
||||
views.check_type_group_delete,
|
||||
name='lingo-manager-check-type-group-delete',
|
||||
),
|
||||
url(
|
||||
r'^check-type/group/(?P<pk>\d+)/export/$',
|
||||
path(
|
||||
'check-type/group/<int:pk>/export/',
|
||||
views.check_type_group_export,
|
||||
name='lingo-manager-check-type-group-export',
|
||||
),
|
||||
url(
|
||||
r'^check-type/group/(?P<group_pk>\d+)/add/$',
|
||||
path(
|
||||
'check-type/group/<int:group_pk>/add/',
|
||||
views.check_type_add,
|
||||
name='lingo-manager-check-type-add',
|
||||
),
|
||||
url(
|
||||
r'^check-type/group/(?P<group_pk>\d+)/(?P<pk>\d+)/edit/$',
|
||||
path(
|
||||
'check-type/group/<int:group_pk>/<int:pk>/edit/',
|
||||
views.check_type_edit,
|
||||
name='lingo-manager-check-type-edit',
|
||||
),
|
||||
url(
|
||||
r'^check-type/group/(?P<group_pk>\d+)/(?P<pk>\d+)/delete/$',
|
||||
path(
|
||||
'check-type/group/<int:group_pk>/<int:pk>/delete/',
|
||||
views.check_type_delete,
|
||||
name='lingo-manager-check-type-delete',
|
||||
),
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import include, url
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||
from django.urls import include, path, re_path
|
||||
|
||||
from .api.urls import urlpatterns as lingo_api_urls
|
||||
from .manager.urls import urlpatterns as lingo_manager_urls
|
||||
|
@ -26,17 +26,17 @@ from .urls_utils import decorated_includes, manager_required
|
|||
from .views import homepage, login, logout
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', homepage, name='homepage'),
|
||||
url(r'^manage/', decorated_includes(manager_required, include(lingo_manager_urls))),
|
||||
url(r'^manage/pricing/', decorated_includes(manager_required, include(lingo_pricing_urls))),
|
||||
url(r'^api/', include(lingo_api_urls)),
|
||||
url(r'^login/$', login, name='auth_login'),
|
||||
url(r'^logout/$', logout, name='auth_logout'),
|
||||
path('', homepage, name='homepage'),
|
||||
re_path(r'^manage/', decorated_includes(manager_required, include(lingo_manager_urls))),
|
||||
re_path(r'^manage/pricing/', decorated_includes(manager_required, include(lingo_pricing_urls))),
|
||||
re_path(r'^api/', include(lingo_api_urls)),
|
||||
path('login/', login, name='auth_login'),
|
||||
path('logout/', logout, name='auth_logout'),
|
||||
]
|
||||
|
||||
if 'mellon' in settings.INSTALLED_APPS:
|
||||
urlpatterns.append(
|
||||
url(
|
||||
re_path(
|
||||
r'^accounts/mellon/',
|
||||
include('mellon.urls'),
|
||||
kwargs={
|
||||
|
@ -53,5 +53,5 @@ if settings.DEBUG and 'debug_toolbar' in settings.INSTALLED_APPS:
|
|||
import debug_toolbar # pylint: disable=import-error
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^__debug__/', include(debug_toolbar.urls)),
|
||||
re_path(r'^__debug__/', include(debug_toolbar.urls)),
|
||||
] + urlpatterns
|
||||
|
|
Loading…
Reference in New Issue