diff --git a/accounting/urls.py b/accounting/urls.py index 63882d45..70eeb158 100644 --- a/accounting/urls.py +++ b/accounting/urls.py @@ -22,131 +22,133 @@ # # -from django.conf.urls import url +from django.urls import re_path from accounting.views import * urlpatterns = [ # Accounting types - url( + re_path( r"^simple_type$", SimplifiedAccountingTypeListView.as_view(), name="simple_type_list", ), - url( + re_path( r"^simple_type/create$", SimplifiedAccountingTypeCreateView.as_view(), name="simple_type_new", ), - url( + re_path( r"^simple_type/(?P[0-9]+)/edit$", SimplifiedAccountingTypeEditView.as_view(), name="simple_type_edit", ), # Accounting types - url(r"^type$", AccountingTypeListView.as_view(), name="type_list"), - url(r"^type/create$", AccountingTypeCreateView.as_view(), name="type_new"), - url( + re_path(r"^type$", AccountingTypeListView.as_view(), name="type_list"), + re_path(r"^type/create$", AccountingTypeCreateView.as_view(), name="type_new"), + re_path( r"^type/(?P[0-9]+)/edit$", AccountingTypeEditView.as_view(), name="type_edit", ), # Bank accounts - url(r"^$", BankAccountListView.as_view(), name="bank_list"), - url(r"^bank/create$", BankAccountCreateView.as_view(), name="bank_new"), - url( + re_path(r"^$", BankAccountListView.as_view(), name="bank_list"), + re_path(r"^bank/create$", BankAccountCreateView.as_view(), name="bank_new"), + re_path( r"^bank/(?P[0-9]+)$", BankAccountDetailView.as_view(), name="bank_details", ), - url( + re_path( r"^bank/(?P[0-9]+)/edit$", BankAccountEditView.as_view(), name="bank_edit", ), - url( + re_path( r"^bank/(?P[0-9]+)/delete$", BankAccountDeleteView.as_view(), name="bank_delete", ), # Club accounts - url(r"^club/create$", ClubAccountCreateView.as_view(), name="club_new"), - url( + re_path(r"^club/create$", ClubAccountCreateView.as_view(), name="club_new"), + re_path( r"^club/(?P[0-9]+)$", ClubAccountDetailView.as_view(), name="club_details", ), - url( + re_path( r"^club/(?P[0-9]+)/edit$", ClubAccountEditView.as_view(), name="club_edit", ), - url( + re_path( r"^club/(?P[0-9]+)/delete$", ClubAccountDeleteView.as_view(), name="club_delete", ), # Journals - url(r"^journal/create$", JournalCreateView.as_view(), name="journal_new"), - url( + re_path(r"^journal/create$", JournalCreateView.as_view(), name="journal_new"), + re_path( r"^journal/(?P[0-9]+)$", JournalDetailView.as_view(), name="journal_details", ), - url( + re_path( r"^journal/(?P[0-9]+)/edit$", JournalEditView.as_view(), name="journal_edit", ), - url( + re_path( r"^journal/(?P[0-9]+)/delete$", JournalDeleteView.as_view(), name="journal_delete", ), - url( + re_path( r"^journal/(?P[0-9]+)/statement/nature$", JournalNatureStatementView.as_view(), name="journal_nature_statement", ), - url( + re_path( r"^journal/(?P[0-9]+)/statement/person$", JournalPersonStatementView.as_view(), name="journal_person_statement", ), - url( + re_path( r"^journal/(?P[0-9]+)/statement/accounting$", JournalAccountingStatementView.as_view(), name="journal_accounting_statement", ), # Operations - url( + re_path( r"^operation/create/(?P[0-9]+)$", OperationCreateView.as_view(), name="op_new", ), - url(r"^operation/(?P[0-9]+)$", OperationEditView.as_view(), name="op_edit"), - url( + re_path( + r"^operation/(?P[0-9]+)$", OperationEditView.as_view(), name="op_edit" + ), + re_path( r"^operation/(?P[0-9]+)/pdf$", OperationPDFView.as_view(), name="op_pdf" ), # Companies - url(r"^company/list$", CompanyListView.as_view(), name="co_list"), - url(r"^company/create$", CompanyCreateView.as_view(), name="co_new"), - url(r"^company/(?P[0-9]+)$", CompanyEditView.as_view(), name="co_edit"), + re_path(r"^company/list$", CompanyListView.as_view(), name="co_list"), + re_path(r"^company/create$", CompanyCreateView.as_view(), name="co_new"), + re_path(r"^company/(?P[0-9]+)$", CompanyEditView.as_view(), name="co_edit"), # Labels - url(r"^label/new$", LabelCreateView.as_view(), name="label_new"), - url( + re_path(r"^label/new$", LabelCreateView.as_view(), name="label_new"), + re_path( r"^label/(?P[0-9]+)$", LabelListView.as_view(), name="label_list", ), - url( + re_path( r"^label/(?P[0-9]+)/edit$", LabelEditView.as_view(), name="label_edit" ), - url( + re_path( r"^label/(?P[0-9]+)/delete$", LabelDeleteView.as_view(), name="label_delete", ), # User account - url(r"^refound/account$", RefoundAccountView.as_view(), name="refound_account"), + re_path(r"^refound/account$", RefoundAccountView.as_view(), name="refound_account"), ] diff --git a/api/urls.py b/api/urls.py index 60a4922c..7a21c608 100644 --- a/api/urls.py +++ b/api/urls.py @@ -22,7 +22,7 @@ # # -from django.conf.urls import url, include +from django.urls import re_path, include from api.views import * from rest_framework import routers @@ -49,8 +49,8 @@ router.register( urlpatterns = [ # API - url(r"^", include(router.urls)), - url(r"^login/", include("rest_framework.urls", namespace="rest_framework")), - url(r"^markdown$", RenderMarkdown, name="api_markdown"), - url(r"^mailings$", FetchMailingLists, name="mailings_fetch"), + re_path(r"^", include(router.urls)), + re_path(r"^login/", include("rest_framework.re_paths", namespace="rest_framework")), + re_path(r"^markdown$", RenderMarkdown, name="api_markdown"), + re_path(r"^mailings$", FetchMailingLists, name="mailings_fetch"), ] diff --git a/club/urls.py b/club/urls.py index c5a01e02..ca7bdf96 100644 --- a/club/urls.py +++ b/club/urls.py @@ -23,80 +23,88 @@ # # -from django.conf.urls import url +from django.urls import re_path from club.views import * urlpatterns = [ - url(r"^$", ClubListView.as_view(), name="club_list"), - url(r"^new$", ClubCreateView.as_view(), name="club_new"), - url(r"^stats$", ClubStatView.as_view(), name="club_stats"), - url(r"^(?P[0-9]+)/$", ClubView.as_view(), name="club_view"), - url( + re_path(r"^$", ClubListView.as_view(), name="club_list"), + re_path(r"^new$", ClubCreateView.as_view(), name="club_new"), + re_path(r"^stats$", ClubStatView.as_view(), name="club_stats"), + re_path(r"^(?P[0-9]+)/$", ClubView.as_view(), name="club_view"), + re_path( r"^(?P[0-9]+)/rev/(?P[0-9]+)/$", ClubRevView.as_view(), name="club_view_rev", ), - url(r"^(?P[0-9]+)/hist$", ClubPageHistView.as_view(), name="club_hist"), - url(r"^(?P[0-9]+)/edit$", ClubEditView.as_view(), name="club_edit"), - url( + re_path( + r"^(?P[0-9]+)/hist$", ClubPageHistView.as_view(), name="club_hist" + ), + re_path(r"^(?P[0-9]+)/edit$", ClubEditView.as_view(), name="club_edit"), + re_path( r"^(?P[0-9]+)/edit/page$", ClubPageEditView.as_view(), name="club_edit_page", ), - url( + re_path( r"^(?P[0-9]+)/members$", ClubMembersView.as_view(), name="club_members" ), - url( + re_path( r"^(?P[0-9]+)/elderlies$", ClubOldMembersView.as_view(), name="club_old_members", ), - url( + re_path( r"^(?P[0-9]+)/sellings$", ClubSellingView.as_view(), name="club_sellings", ), - url( + re_path( r"^(?P[0-9]+)/sellings/csv$", ClubSellingCSVView.as_view(), name="sellings_csv", ), - url(r"^(?P[0-9]+)/prop$", ClubEditPropView.as_view(), name="club_prop"), - url(r"^(?P[0-9]+)/tools$", ClubToolsView.as_view(), name="tools"), - url(r"^(?P[0-9]+)/mailing$", ClubMailingView.as_view(), name="mailing"), - url( + re_path( + r"^(?P[0-9]+)/prop$", ClubEditPropView.as_view(), name="club_prop" + ), + re_path(r"^(?P[0-9]+)/tools$", ClubToolsView.as_view(), name="tools"), + re_path( + r"^(?P[0-9]+)/mailing$", ClubMailingView.as_view(), name="mailing" + ), + re_path( r"^(?P[0-9]+)/mailing/generate$", MailingAutoGenerationView.as_view(), name="mailing_generate", ), - url( + re_path( r"^(?P[0-9]+)/mailing/delete$", MailingDeleteView.as_view(), name="mailing_delete", ), - url( + re_path( r"^(?P[0-9]+)/mailing/delete/subscription$", MailingSubscriptionDeleteView.as_view(), name="mailing_subscription_delete", ), - url( + re_path( r"^membership/(?P[0-9]+)/set_old$", MembershipSetOldView.as_view(), name="membership_set_old", ), - url(r"^(?P[0-9]+)/poster$", PosterListView.as_view(), name="poster_list"), - url( + re_path( + r"^(?P[0-9]+)/poster$", PosterListView.as_view(), name="poster_list" + ), + re_path( r"^(?P[0-9]+)/poster/create$", PosterCreateView.as_view(), name="poster_create", ), - url( + re_path( r"^(?P[0-9]+)/poster/(?P[0-9]+)/edit$", PosterEditView.as_view(), name="poster_edit", ), - url( + re_path( r"^(?P[0-9]+)/poster/(?P[0-9]+)/delete$", PosterDeleteView.as_view(), name="poster_delete", diff --git a/com/urls.py b/com/urls.py index 1caff5fc..6128d1d4 100644 --- a/com/urls.py +++ b/com/urls.py @@ -22,97 +22,103 @@ # # -from django.conf.urls import url +from django.urls import re_path from com.views import * from club.views import MailingDeleteView urlpatterns = [ - url(r"^sith/edit/alert$", AlertMsgEditView.as_view(), name="alert_edit"), - url(r"^sith/edit/info$", InfoMsgEditView.as_view(), name="info_edit"), - url( + re_path(r"^sith/edit/alert$", AlertMsgEditView.as_view(), name="alert_edit"), + re_path(r"^sith/edit/info$", InfoMsgEditView.as_view(), name="info_edit"), + re_path( r"^sith/edit/weekmail_destinations$", WeekmailDestinationEditView.as_view(), name="weekmail_destinations", ), - url(r"^weekmail$", WeekmailEditView.as_view(), name="weekmail"), - url(r"^weekmail/preview$", WeekmailPreviewView.as_view(), name="weekmail_preview"), - url( + re_path(r"^weekmail$", WeekmailEditView.as_view(), name="weekmail"), + re_path( + r"^weekmail/preview$", WeekmailPreviewView.as_view(), name="weekmail_preview" + ), + re_path( r"^weekmail/new_article$", WeekmailArticleCreateView.as_view(), name="weekmail_article", ), - url( + re_path( r"^weekmail/article/(?P[0-9]+)/delete$", WeekmailArticleDeleteView.as_view(), name="weekmail_article_delete", ), - url( + re_path( r"^weekmail/article/(?P[0-9]+)/edit$", WeekmailArticleEditView.as_view(), name="weekmail_article_edit", ), - url(r"^news$", NewsListView.as_view(), name="news_list"), - url(r"^news/admin$", NewsAdminListView.as_view(), name="news_admin_list"), - url(r"^news/create$", NewsCreateView.as_view(), name="news_new"), - url( + re_path(r"^news$", NewsListView.as_view(), name="news_list"), + re_path(r"^news/admin$", NewsAdminListView.as_view(), name="news_admin_list"), + re_path(r"^news/create$", NewsCreateView.as_view(), name="news_new"), + re_path( r"^news/(?P[0-9]+)/delete$", NewsDeleteView.as_view(), name="news_delete", ), - url( + re_path( r"^news/(?P[0-9]+)/moderate$", NewsModerateView.as_view(), name="news_moderate", ), - url(r"^news/(?P[0-9]+)/edit$", NewsEditView.as_view(), name="news_edit"), - url(r"^news/(?P[0-9]+)$", NewsDetailView.as_view(), name="news_detail"), - url(r"^mailings$", MailingListAdminView.as_view(), name="mailing_admin"), - url( + re_path( + r"^news/(?P[0-9]+)/edit$", NewsEditView.as_view(), name="news_edit" + ), + re_path( + r"^news/(?P[0-9]+)$", NewsDetailView.as_view(), name="news_detail" + ), + re_path(r"^mailings$", MailingListAdminView.as_view(), name="mailing_admin"), + re_path( r"^mailings/(?P[0-9]+)/moderate$", MailingModerateView.as_view(), name="mailing_moderate", ), - url( + re_path( r"^mailings/(?P[0-9]+)/delete$", MailingDeleteView.as_view(redirect_page="com:mailing_admin"), name="mailing_delete", ), - url(r"^poster$", PosterListView.as_view(), name="poster_list"), - url(r"^poster/create$", PosterCreateView.as_view(), name="poster_create"), - url( + re_path(r"^poster$", PosterListView.as_view(), name="poster_list"), + re_path(r"^poster/create$", PosterCreateView.as_view(), name="poster_create"), + re_path( r"^poster/(?P[0-9]+)/edit$", PosterEditView.as_view(), name="poster_edit", ), - url( + re_path( r"^poster/(?P[0-9]+)/delete$", PosterDeleteView.as_view(), name="poster_delete", ), - url( + re_path( r"^poster/moderate$", PosterModerateListView.as_view(), name="poster_moderate_list", ), - url( + re_path( r"^poster/(?P[0-9]+)/moderate$", PosterModerateView.as_view(), name="poster_moderate", ), - url(r"^screen$", ScreenListView.as_view(), name="screen_list"), - url(r"^screen/create$", ScreenCreateView.as_view(), name="screen_create"), - url( + re_path(r"^screen$", ScreenListView.as_view(), name="screen_list"), + re_path(r"^screen/create$", ScreenCreateView.as_view(), name="screen_create"), + re_path( r"^screen/(?P[0-9]+)/slideshow$", ScreenSlideshowView.as_view(), name="screen_slideshow", ), - url( + re_path( r"^screen/(?P[0-9]+)/edit$", ScreenEditView.as_view(), name="screen_edit", ), - url( + re_path( r"^screen/(?P[0-9]+)/delete$", ScreenDeleteView.as_view(), name="screen_delete", diff --git a/core/urls.py b/core/urls.py index 6798a6bb..d937e4de 100644 --- a/core/urls.py +++ b/core/urls.py @@ -23,189 +23,195 @@ # # -from django.conf.urls import url +from django.urls import re_path from core.views import * urlpatterns = [ - url(r"^$", index, name="index"), - url(r"^to_markdown$", ToMarkdownView.as_view(), name="to_markdown"), - url(r"^notifications$", NotificationList.as_view(), name="notification_list"), - url(r"^notification/(?P[0-9]+)$", notification, name="notification"), + re_path(r"^$", index, name="index"), + re_path(r"^to_markdown$", ToMarkdownView.as_view(), name="to_markdown"), + re_path(r"^notifications$", NotificationList.as_view(), name="notification_list"), + re_path(r"^notification/(?P[0-9]+)$", notification, name="notification"), # Search - url(r"^search/$", search_view, name="search"), - url(r"^search_json/$", search_json, name="search_json"), - url(r"^search_user/$", search_user_json, name="search_user"), + re_path(r"^search/$", search_view, name="search"), + re_path(r"^search_json/$", search_json, name="search_json"), + re_path(r"^search_user/$", search_user_json, name="search_user"), # Login and co - url(r"^login/$", login, name="login"), - url(r"^logout/$", logout, name="logout"), - url(r"^password_change/$", password_change, name="password_change"), - url( + re_path(r"^login/$", login, name="login"), + re_path(r"^logout/$", logout, name="logout"), + re_path(r"^password_change/$", password_change, name="password_change"), + re_path( r"^password_change/(?P[0-9]+)$", password_root_change, name="password_root_change", ), - url(r"^password_change/done$", password_change_done, name="password_change_done"), - url(r"^password_reset/$", password_reset, name="password_reset"), - url(r"^password_reset/done$", password_reset_done, name="password_reset_done"), - url( + re_path( + r"^password_change/done$", password_change_done, name="password_change_done" + ), + re_path(r"^password_reset/$", password_reset, name="password_reset"), + re_path(r"^password_reset/done$", password_reset_done, name="password_reset_done"), + re_path( r"^reset/(?P[0-9A-Za-z_\-]+)/(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$", password_reset_confirm, name="password_reset_confirm", ), - url(r"^reset/done/$", password_reset_complete, name="password_reset_complete"), - url(r"^register$", register, name="register"), + re_path(r"^reset/done/$", password_reset_complete, name="password_reset_complete"), + re_path(r"^register$", register, name="register"), # Group handling - url(r"^group/$", GroupListView.as_view(), name="group_list"), - url(r"^group/new$", GroupCreateView.as_view(), name="group_new"), - url(r"^group/(?P[0-9]+)/$", GroupEditView.as_view(), name="group_edit"), - url( + re_path(r"^group/$", GroupListView.as_view(), name="group_list"), + re_path(r"^group/new$", GroupCreateView.as_view(), name="group_new"), + re_path( + r"^group/(?P[0-9]+)/$", GroupEditView.as_view(), name="group_edit" + ), + re_path( r"^group/(?P[0-9]+)/delete$", GroupDeleteView.as_view(), name="group_delete", ), - url( + re_path( r"^group/(?P[0-9]+)/detail$", GroupTemplateView.as_view(), name="group_detail", ), # User views - url(r"^user/$", UserListView.as_view(), name="user_list"), - url( + re_path(r"^user/$", UserListView.as_view(), name="user_list"), + re_path( r"^user/(?P[0-9]+)/mini$", UserMiniView.as_view(), name="user_profile_mini", ), - url(r"^user/(?P[0-9]+)/$", UserView.as_view(), name="user_profile"), - url( + re_path(r"^user/(?P[0-9]+)/$", UserView.as_view(), name="user_profile"), + re_path( r"^user/(?P[0-9]+)/pictures$", UserPicturesView.as_view(), name="user_pictures", ), - url( + re_path( r"^user/(?P[0-9]+)/godfathers$", UserGodfathersView.as_view(), name="user_godfathers", ), - url( + re_path( r"^user/(?P[0-9]+)/godfathers/tree$", UserGodfathersTreeView.as_view(), name="user_godfathers_tree", ), - url( + re_path( r"^user/(?P[0-9]+)/godfathers/tree/pict$", UserGodfathersTreePictureView.as_view(), name="user_godfathers_tree_pict", ), - url( + re_path( r"^user/(?P[0-9]+)/godfathers/(?P[0-9]+)/(?P(True)|(False))/delete$", DeleteUserGodfathers, name="user_godfathers_delete", ), - url( + re_path( r"^user/(?P[0-9]+)/edit$", UserUpdateProfileView.as_view(), name="user_edit", ), - url( + re_path( r"^user/(?P[0-9]+)/profile_upload$", UserUploadProfilePictView.as_view(), name="user_profile_upload", ), - url(r"^user/(?P[0-9]+)/clubs$", UserClubView.as_view(), name="user_clubs"), - url( + re_path( + r"^user/(?P[0-9]+)/clubs$", UserClubView.as_view(), name="user_clubs" + ), + re_path( r"^user/(?P[0-9]+)/prefs$", UserPreferencesView.as_view(), name="user_prefs", ), - url( + re_path( r"^user/(?P[0-9]+)/groups$", UserUpdateGroupView.as_view(), name="user_groups", ), - url(r"^user/tools/$", UserToolsView.as_view(), name="user_tools"), - url( + re_path(r"^user/tools/$", UserToolsView.as_view(), name="user_tools"), + re_path( r"^user/(?P[0-9]+)/account$", UserAccountView.as_view(), name="user_account", ), - url( + re_path( r"^user/(?P[0-9]+)/account/(?P[0-9]+)/(?P[0-9]+)$", UserAccountDetailView.as_view(), name="user_account_detail", ), - url( + re_path( r"^user/(?P[0-9]+)/stats$", UserStatsView.as_view(), name="user_stats" ), - url( + re_path( r"^user/(?P[0-9]+)/gift/create$", GiftCreateView.as_view(), name="user_gift_create", ), - url( + re_path( r"^user/(?P[0-9]+)/gift/delete/(?P[0-9]+)/$", GiftDeleteView.as_view(), name="user_gift_delete", ), # File views - # url(r'^file/add/(?Ppopup)?$', FileCreateView.as_view(), name='file_new'), - url(r"^file/(?Ppopup)?$", FileListView.as_view(), name="file_list"), - url( + # re_path(r'^file/add/(?Ppopup)?$', FileCreateView.as_view(), name='file_new'), + re_path(r"^file/(?Ppopup)?$", FileListView.as_view(), name="file_list"), + re_path( r"^file/(?P[0-9]+)/(?Ppopup)?$", FileView.as_view(), name="file_detail", ), - url( + re_path( r"^file/(?P[0-9]+)/edit/(?Ppopup)?$", FileEditView.as_view(), name="file_edit", ), - url( + re_path( r"^file/(?P[0-9]+)/prop/(?Ppopup)?$", FileEditPropView.as_view(), name="file_prop", ), - url( + re_path( r"^file/(?P[0-9]+)/delete/(?Ppopup)?$", FileDeleteView.as_view(), name="file_delete", ), - url(r"^file/moderation$", FileModerationView.as_view(), name="file_moderation"), - url( + re_path(r"^file/moderation$", FileModerationView.as_view(), name="file_moderation"), + re_path( r"^file/(?P[0-9]+)/moderate$", FileModerateView.as_view(), name="file_moderate", ), - url(r"^file/(?P[0-9]+)/download$", send_file, name="download"), + re_path(r"^file/(?P[0-9]+)/download$", send_file, name="download"), # Page views - url(r"^page/$", PageListView.as_view(), name="page_list"), - url(r"^page/create$", PageCreateView.as_view(), name="page_new"), - url( + re_path(r"^page/$", PageListView.as_view(), name="page_list"), + re_path(r"^page/create$", PageCreateView.as_view(), name="page_new"), + re_path( r"^page/(?P[0-9]*)/delete$", PageDeleteView.as_view(), name="page_delete", ), - url( + re_path( r"^page/(?P([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/edit$", PageEditView.as_view(), name="page_edit", ), - url( + re_path( r"^page/(?P([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/prop$", PagePropView.as_view(), name="page_prop", ), - url( + re_path( r"^page/(?P([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/hist$", PageHistView.as_view(), name="page_hist", ), - url( + re_path( r"^page/(?P([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/rev/(?P[0-9]+)/", PageRevView.as_view(), name="page_rev", ), - url( + re_path( r"^page/(?P([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/$", PageView.as_view(), name="page", diff --git a/counter/urls.py b/counter/urls.py index fe3d90fa..42451bd4 100644 --- a/counter/urls.py +++ b/counter/urls.py @@ -22,119 +22,119 @@ # # -from django.conf.urls import url +from django.urls import re_path from counter.views import * urlpatterns = [ - url(r"^(?P[0-9]+)$", CounterMain.as_view(), name="details"), - url( + re_path(r"^(?P[0-9]+)$", CounterMain.as_view(), name="details"), + re_path( r"^(?P[0-9]+)/click/(?P[0-9]+)$", CounterClick.as_view(), name="click", ), - url( + re_path( r"^(?P[0-9]+)/last_ops$", CounterLastOperationsView.as_view(), name="last_ops", ), - url( + re_path( r"^(?P[0-9]+)/cash_summary$", CounterCashSummaryView.as_view(), name="cash_summary", ), - url( + re_path( r"^(?P[0-9]+)/activity$", CounterActivityView.as_view(), name="activity", ), - url(r"^(?P[0-9]+)/stats$", CounterStatView.as_view(), name="stats"), - url(r"^(?P[0-9]+)/login$", CounterLogin.as_view(), name="login"), - url(r"^(?P[0-9]+)/logout$", CounterLogout.as_view(), name="logout"), - url( + re_path(r"^(?P[0-9]+)/stats$", CounterStatView.as_view(), name="stats"), + re_path(r"^(?P[0-9]+)/login$", CounterLogin.as_view(), name="login"), + re_path(r"^(?P[0-9]+)/logout$", CounterLogout.as_view(), name="logout"), + re_path( r"^eticket/(?P[0-9]+)/pdf$", EticketPDFView.as_view(), name="eticket_pdf", ), - url( + re_path( r"^customer/(?P[0-9]+)/card/add$", StudentCardFormView.as_view(), name="add_student_card", ), - url( + re_path( r"^customer/(?P[0-9]+)/card/delete/(?P[0-9]+)/$", StudentCardDeleteView.as_view(), name="delete_student_card", ), - url(r"^admin/(?P[0-9]+)$", CounterEditView.as_view(), name="admin"), - url( + re_path(r"^admin/(?P[0-9]+)$", CounterEditView.as_view(), name="admin"), + re_path( r"^admin/(?P[0-9]+)/prop$", CounterEditPropView.as_view(), name="prop_admin", ), - url(r"^admin$", CounterListView.as_view(), name="admin_list"), - url(r"^admin/new$", CounterCreateView.as_view(), name="new"), - url( + re_path(r"^admin$", CounterListView.as_view(), name="admin_list"), + re_path(r"^admin/new$", CounterCreateView.as_view(), name="new"), + re_path( r"^admin/delete/(?P[0-9]+)$", CounterDeleteView.as_view(), name="delete", ), - url(r"^admin/invoices_call$", InvoiceCallView.as_view(), name="invoices_call"), - url( + re_path(r"^admin/invoices_call$", InvoiceCallView.as_view(), name="invoices_call"), + re_path( r"^admin/cash_summary/list$", CashSummaryListView.as_view(), name="cash_summary_list", ), - url( + re_path( r"^admin/cash_summary/(?P[0-9]+)$", CashSummaryEditView.as_view(), name="cash_summary_edit", ), - url(r"^admin/product/list$", ProductListView.as_view(), name="product_list"), - url( + re_path(r"^admin/product/list$", ProductListView.as_view(), name="product_list"), + re_path( r"^admin/product/list_archived$", ProductArchivedListView.as_view(), name="product_list_archived", ), - url(r"^admin/product/create$", ProductCreateView.as_view(), name="new_product"), - url( + re_path(r"^admin/product/create$", ProductCreateView.as_view(), name="new_product"), + re_path( r"^admin/product/(?P[0-9]+)$", ProductEditView.as_view(), name="product_edit", ), - url( + re_path( r"^admin/producttype/list$", ProductTypeListView.as_view(), name="producttype_list", ), - url( + re_path( r"^admin/producttype/create$", ProductTypeCreateView.as_view(), name="new_producttype", ), - url( + re_path( r"^admin/producttype/(?P[0-9]+)$", ProductTypeEditView.as_view(), name="producttype_edit", ), - url(r"^admin/eticket/list$", EticketListView.as_view(), name="eticket_list"), - url(r"^admin/eticket/new$", EticketCreateView.as_view(), name="new_eticket"), - url( + re_path(r"^admin/eticket/list$", EticketListView.as_view(), name="eticket_list"), + re_path(r"^admin/eticket/new$", EticketCreateView.as_view(), name="new_eticket"), + re_path( r"^admin/eticket/(?P[0-9]+)$", EticketEditView.as_view(), name="edit_eticket", ), - url( + re_path( r"^admin/selling/(?P[0-9]+)/delete$", SellingDeleteView.as_view(), name="selling_delete", ), - url( + re_path( r"^admin/refilling/(?P[0-9]+)/delete$", RefillingDeleteView.as_view(), name="refilling_delete", ), - url( + re_path( r"^admin/(?P[0-9]+)/refillings$", CounterRefillingListView.as_view(), name="refilling_list", diff --git a/eboutic/urls.py b/eboutic/urls.py index 4ee79f53..a072efb4 100644 --- a/eboutic/urls.py +++ b/eboutic/urls.py @@ -22,16 +22,16 @@ # # -from django.conf.urls import url +from django.urls import re_path from eboutic.views import * urlpatterns = [ # Subscription views - url(r"^$", EbouticMain.as_view(), name="main"), - url(r"^command$", EbouticCommand.as_view(), name="command"), - url(r"^pay$", EbouticPayWithSith.as_view(), name="pay_with_sith"), - url( + re_path(r"^$", EbouticMain.as_view(), name="main"), + re_path(r"^command$", EbouticCommand.as_view(), name="command"), + re_path(r"^pay$", EbouticPayWithSith.as_view(), name="pay_with_sith"), + re_path( r"^et_autoanswer$", EtransactionAutoAnswer.as_view(), name="etransation_autoanswer", diff --git a/election/urls.py b/election/urls.py index c7bde487..4d6b4e1e 100644 --- a/election/urls.py +++ b/election/urls.py @@ -1,55 +1,57 @@ -from django.conf.urls import url +from django.urls import re_path from election.views import * urlpatterns = [ - url(r"^$", ElectionsListView.as_view(), name="list"), - url(r"^archived$", ElectionListArchivedView.as_view(), name="list_archived"), - url(r"^add$", ElectionCreateView.as_view(), name="create"), - url(r"^(?P[0-9]+)/edit$", ElectionUpdateView.as_view(), name="update"), - url( + re_path(r"^$", ElectionsListView.as_view(), name="list"), + re_path(r"^archived$", ElectionListArchivedView.as_view(), name="list_archived"), + re_path(r"^add$", ElectionCreateView.as_view(), name="create"), + re_path( + r"^(?P[0-9]+)/edit$", ElectionUpdateView.as_view(), name="update" + ), + re_path( r"^(?P[0-9]+)/delete$", ElectionDeleteView.as_view(), name="delete" ), - url( + re_path( r"^(?P[0-9]+)/list/add$", ElectionListCreateView.as_view(), name="create_list", ), - url( + re_path( r"^(?P[0-9]+)/list/delete$", ElectionListDeleteView.as_view(), name="delete_list", ), - url( + re_path( r"^(?P[0-9]+)/role/create$", RoleCreateView.as_view(), name="create_role", ), - url( + re_path( r"^(?P[0-9]+)/role/edit$", RoleUpdateView.as_view(), name="update_role" ), - url( + re_path( r"^(?P[0-9]+)/role/delete$", RoleDeleteView.as_view(), name="delete_role", ), - url( + re_path( r"^(?P[0-9]+)/candidate/add$", CandidatureCreateView.as_view(), name="candidate", ), - url( + re_path( r"^(?P[0-9]+)/candidate/edit$", CandidatureUpdateView.as_view(), name="update_candidate", ), - url( + re_path( r"^(?P[0-9]+)/candidate/delete$", CandidatureDeleteView.as_view(), name="delete_candidate", ), - url(r"^(?P[0-9]+)/vote$", VoteFormView.as_view(), name="vote"), - url( + re_path(r"^(?P[0-9]+)/vote$", VoteFormView.as_view(), name="vote"), + re_path( r"^(?P[0-9]+)/detail$", ElectionDetailView.as_view(), name="detail" ), ] diff --git a/forum/urls.py b/forum/urls.py index 9a504034..de19d7cc 100644 --- a/forum/urls.py +++ b/forum/urls.py @@ -22,64 +22,68 @@ # # -from django.conf.urls import url +from django.urls import re_path from forum.views import * urlpatterns = [ - url(r"^$", ForumMainView.as_view(), name="main"), - url(r"^search/$", ForumSearchView.as_view(), name="search"), - url(r"^new_forum$", ForumCreateView.as_view(), name="new_forum"), - url(r"^mark_all_as_read$", ForumMarkAllAsRead.as_view(), name="mark_all_as_read"), - url(r"^last_unread$", ForumLastUnread.as_view(), name="last_unread"), - url(r"^favorite_topics$", ForumFavoriteTopics.as_view(), name="favorite_topics"), - url(r"^(?P[0-9]+)$", ForumDetailView.as_view(), name="view_forum"), - url(r"^(?P[0-9]+)/edit$", ForumEditView.as_view(), name="edit_forum"), - url( + re_path(r"^$", ForumMainView.as_view(), name="main"), + re_path(r"^search/$", ForumSearchView.as_view(), name="search"), + re_path(r"^new_forum$", ForumCreateView.as_view(), name="new_forum"), + re_path( + r"^mark_all_as_read$", ForumMarkAllAsRead.as_view(), name="mark_all_as_read" + ), + re_path(r"^last_unread$", ForumLastUnread.as_view(), name="last_unread"), + re_path( + r"^favorite_topics$", ForumFavoriteTopics.as_view(), name="favorite_topics" + ), + re_path(r"^(?P[0-9]+)$", ForumDetailView.as_view(), name="view_forum"), + re_path(r"^(?P[0-9]+)/edit$", ForumEditView.as_view(), name="edit_forum"), + re_path( r"^(?P[0-9]+)/delete$", ForumDeleteView.as_view(), name="delete_forum" ), - url( + re_path( r"^(?P[0-9]+)/new_topic$", ForumTopicCreateView.as_view(), name="new_topic", ), - url( + re_path( r"^topic/(?P[0-9]+)$", ForumTopicDetailView.as_view(), name="view_topic", ), - url( + re_path( r"^topic/(?P[0-9]+)/edit$", ForumTopicEditView.as_view(), name="edit_topic", ), - url( + re_path( r"^topic/(?P[0-9]+)/new_message$", ForumMessageCreateView.as_view(), name="new_message", ), - url( + re_path( r"^topic/(?P[0-9]+)/toggle_subscribe$", ForumTopicSubscribeView.as_view(), name="toggle_subscribe_topic", ), - url( + re_path( r"^message/(?P[0-9]+)$", ForumMessageView.as_view(), name="view_message", ), - url( + re_path( r"^message/(?P[0-9]+)/edit$", ForumMessageEditView.as_view(), name="edit_message", ), - url( + re_path( r"^message/(?P[0-9]+)/delete$", ForumMessageDeleteView.as_view(), name="delete_message", ), - url( + re_path( r"^message/(?P[0-9]+)/undelete$", ForumMessageUndeleteView.as_view(), name="undelete_message", diff --git a/launderette/urls.py b/launderette/urls.py index 35baabb1..b259c2d9 100644 --- a/launderette/urls.py +++ b/launderette/urls.py @@ -22,53 +22,53 @@ # # -from django.conf.urls import url +from django.urls import re_path from launderette.views import * urlpatterns = [ # views - url(r"^$", LaunderetteMainView.as_view(), name="launderette_main"), - url( + re_path(r"^$", LaunderetteMainView.as_view(), name="launderette_main"), + re_path( r"^slot/(?P[0-9]+)/delete$", SlotDeleteView.as_view(), name="delete_slot", ), - url(r"^book$", LaunderetteBookMainView.as_view(), name="book_main"), - url( + re_path(r"^book$", LaunderetteBookMainView.as_view(), name="book_main"), + re_path( r"^book/(?P[0-9]+)$", LaunderetteBookView.as_view(), name="book_slot", ), - url( + re_path( r"^(?P[0-9]+)/click$", LaunderetteMainClickView.as_view(), name="main_click", ), - url( + re_path( r"^(?P[0-9]+)/click/(?P[0-9]+)$", LaunderetteClickView.as_view(), name="click", ), - url(r"^admin$", LaunderetteListView.as_view(), name="launderette_list"), - url( + re_path(r"^admin$", LaunderetteListView.as_view(), name="launderette_list"), + re_path( r"^admin/(?P[0-9]+)$", LaunderetteAdminView.as_view(), name="launderette_admin", ), - url( + re_path( r"^admin/(?P[0-9]+)/edit$", LaunderetteEditView.as_view(), name="launderette_edit", ), - url(r"^admin/new$", LaunderetteCreateView.as_view(), name="launderette_new"), - url(r"^admin/machine/new$", MachineCreateView.as_view(), name="machine_new"), - url( + re_path(r"^admin/new$", LaunderetteCreateView.as_view(), name="launderette_new"), + re_path(r"^admin/machine/new$", MachineCreateView.as_view(), name="machine_new"), + re_path( r"^admin/machine/(?P[0-9]+)/edit$", MachineEditView.as_view(), name="machine_edit", ), - url( + re_path( r"^admin/machine/(?P[0-9]+)/delete$", MachineDeleteView.as_view(), name="machine_delete", diff --git a/matmat/urls.py b/matmat/urls.py index 1959553d..80960c59 100644 --- a/matmat/urls.py +++ b/matmat/urls.py @@ -22,13 +22,13 @@ # # -from django.conf.urls import url +from django.urls import re_path from matmat.views import * urlpatterns = [ - url(r"^$", SearchNormalFormView.as_view(), name="search"), - url(r"^reverse$", SearchReverseFormView.as_view(), name="search_reverse"), - url(r"^quick$", SearchQuickFormView.as_view(), name="search_quick"), - url(r"^clear$", SearchClearFormView.as_view(), name="search_clear"), + re_path(r"^$", SearchNormalFormView.as_view(), name="search"), + re_path(r"^reverse$", SearchReverseFormView.as_view(), name="search_reverse"), + re_path(r"^quick$", SearchQuickFormView.as_view(), name="search_quick"), + re_path(r"^clear$", SearchClearFormView.as_view(), name="search_clear"), ] diff --git a/pedagogy/urls.py b/pedagogy/urls.py index 5527bf3b..478d7ad1 100644 --- a/pedagogy/urls.py +++ b/pedagogy/urls.py @@ -22,33 +22,33 @@ # # -from django.conf.urls import url +from django.urls import re_path from pedagogy.views import * urlpatterns = [ # Urls displaying the actual application for visitors - url(r"^$", UVListView.as_view(), name="guide"), - url(r"^uv/(?P[0-9]+)$", UVDetailFormView.as_view(), name="uv_detail"), - url( + re_path(r"^$", UVListView.as_view(), name="guide"), + re_path(r"^uv/(?P[0-9]+)$", UVDetailFormView.as_view(), name="uv_detail"), + re_path( r"^comment/(?P[0-9]+)/edit$", UVCommentUpdateView.as_view(), name="comment_update", ), - url( + re_path( r"^comment/(?P[0-9]+)/delete$", UVCommentDeleteView.as_view(), name="comment_delete", ), - url( + re_path( r"^comment/(?P[0-9]+)/report$", UVCommentReportCreateView.as_view(), name="comment_report", ), # Moderation - url(r"^moderation$", UVModerationFormView.as_view(), name="moderation"), + re_path(r"^moderation$", UVModerationFormView.as_view(), name="moderation"), # Administration : Create Update Delete Edit - url(r"^uv/create$", UVCreateView.as_view(), name="uv_create"), - url(r"^uv/(?P[0-9]+)/delete$", UVDeleteView.as_view(), name="uv_delete"), - url(r"^uv/(?P[0-9]+)/edit$", UVUpdateView.as_view(), name="uv_update"), + re_path(r"^uv/create$", UVCreateView.as_view(), name="uv_create"), + re_path(r"^uv/(?P[0-9]+)/delete$", UVDeleteView.as_view(), name="uv_delete"), + re_path(r"^uv/(?P[0-9]+)/edit$", UVUpdateView.as_view(), name="uv_update"), ] diff --git a/requirements.txt b/requirements.txt index 3d9c3042..bf650400 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Django 1.11 LTS is required -Django >=1.11, <2.0 +Django >=2.2, <3.0 Pillow mistune django-jinja diff --git a/rootplace/urls.py b/rootplace/urls.py index 6d4ef30c..f2cc97f2 100644 --- a/rootplace/urls.py +++ b/rootplace/urls.py @@ -22,13 +22,13 @@ # # -from django.conf.urls import url +from django.urls import re_path from rootplace.views import * urlpatterns = [ - url(r"^merge$", MergeUsersView.as_view(), name="merge"), - url( + re_path(r"^merge$", MergeUsersView.as_view(), name="merge"), + re_path( r"^forum/messages/delete$", DeleteAllForumUserMessagesView.as_view(), name="delete_forum_messages", diff --git a/sas/urls.py b/sas/urls.py index 7b53c0ec..fada615f 100644 --- a/sas/urls.py +++ b/sas/urls.py @@ -22,40 +22,40 @@ # # -from django.conf.urls import url +from django.urls import re_path from sas.views import * urlpatterns = [ - url(r"^$", SASMainView.as_view(), name="main"), - url(r"^moderation$", ModerationView.as_view(), name="moderation"), - url(r"^album/(?P[0-9]+)$", AlbumView.as_view(), name="album"), - url( + re_path(r"^$", SASMainView.as_view(), name="main"), + re_path(r"^moderation$", ModerationView.as_view(), name="moderation"), + re_path(r"^album/(?P[0-9]+)$", AlbumView.as_view(), name="album"), + re_path( r"^album/(?P[0-9]+)/upload$", AlbumUploadView.as_view(), name="album_upload", ), - url( + re_path( r"^album/(?P[0-9]+)/edit$", AlbumEditView.as_view(), name="album_edit" ), - url(r"^album/(?P[0-9]+)/preview$", send_album, name="album_preview"), - url(r"^picture/(?P[0-9]+)$", PictureView.as_view(), name="picture"), - url( + re_path(r"^album/(?P[0-9]+)/preview$", send_album, name="album_preview"), + re_path(r"^picture/(?P[0-9]+)$", PictureView.as_view(), name="picture"), + re_path( r"^picture/(?P[0-9]+)/edit$", PictureEditView.as_view(), name="picture_edit", ), - url(r"^picture/(?P[0-9]+)/download$", send_pict, name="download"), - url( + re_path(r"^picture/(?P[0-9]+)/download$", send_pict, name="download"), + re_path( r"^picture/(?P[0-9]+)/download/compressed$", send_compressed, name="download_compressed", ), - url( + re_path( r"^picture/(?P[0-9]+)/download/thumb$", send_thumb, name="download_thumb", ), - # url(r'^album/new$', AlbumCreateView.as_view(), name='album_new'), - # url(r'^(?P[0-9]+)/$', ClubView.as_view(), name='club_view'), + # re_path(r'^album/new$', AlbumCreateView.as_view(), name='album_new'), + # re_path(r'^(?P[0-9]+)/$', ClubView.as_view(), name='club_view'), ] diff --git a/sith/urls.py b/sith/urls.py index 23f82469..c37a93f0 100644 --- a/sith/urls.py +++ b/sith/urls.py @@ -37,9 +37,9 @@ Including another URLconf 1. Add an import: from blog import urls as blog_urls 2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) """ -from django.conf.urls import include, url +from django.urls import include, re_path from django.contrib import admin -from django.conf.urls.static import static +from django.urls.static import static from django.conf import settings from django.views.i18n import javascript_catalog from ajax_select import urls as ajax_select_urls @@ -51,48 +51,61 @@ handler404 = "core.views.not_found" handler500 = "core.views.internal_servor_error" urlpatterns = [ - url(r"^", include("core.urls", namespace="core", app_name="core")), - url( + re_path(r"^", include("core.re_paths", namespace="core", app_name="core")), + re_path( r"^rootplace/", - include("rootplace.urls", namespace="rootplace", app_name="rootplace"), + include("rootplace.re_paths", namespace="rootplace", app_name="rootplace"), ), - url( + re_path( r"^subscription/", - include("subscription.urls", namespace="subscription", app_name="subscription"), + include( + "subscription.re_paths", namespace="subscription", app_name="subscription" + ), ), - url(r"^com/", include("com.urls", namespace="com", app_name="com")), - url(r"^club/", include("club.urls", namespace="club", app_name="club")), - url(r"^counter/", include("counter.urls", namespace="counter", app_name="counter")), - url(r"^stock/", include("stock.urls", namespace="stock", app_name="stock")), - url( + re_path(r"^com/", include("com.re_paths", namespace="com", app_name="com")), + re_path(r"^club/", include("club.re_paths", namespace="club", app_name="club")), + re_path( + r"^counter/", + include("counter.re_paths", namespace="counter", app_name="counter"), + ), + re_path(r"^stock/", include("stock.re_paths", namespace="stock", app_name="stock")), + re_path( r"^accounting/", - include("accounting.urls", namespace="accounting", app_name="accounting"), + include("accounting.re_paths", namespace="accounting", app_name="accounting"), ), - url(r"^eboutic/", include("eboutic.urls", namespace="eboutic", app_name="eboutic")), - url( + re_path( + r"^eboutic/", + include("eboutic.re_paths", namespace="eboutic", app_name="eboutic"), + ), + re_path( r"^launderette/", - include("launderette.urls", namespace="launderette", app_name="launderette"), + include( + "launderette.re_paths", namespace="launderette", app_name="launderette" + ), ), - url(r"^sas/", include("sas.urls", namespace="sas", app_name="sas")), - url(r"^api/v1/", include("api.urls", namespace="api", app_name="api")), - url( + re_path(r"^sas/", include("sas.re_paths", namespace="sas", app_name="sas")), + re_path(r"^api/v1/", include("api.re_paths", namespace="api", app_name="api")), + re_path( r"^election/", - include("election.urls", namespace="election", app_name="election"), + include("election.re_paths", namespace="election", app_name="election"), ), - url(r"^forum/", include("forum.urls", namespace="forum", app_name="forum")), - url(r"^trombi/", include("trombi.urls", namespace="trombi", app_name="trombi")), - url( - r"^matmatronch/", include("matmat.urls", namespace="matmat", app_name="matmat") + re_path(r"^forum/", include("forum.re_paths", namespace="forum", app_name="forum")), + re_path( + r"^trombi/", include("trombi.re_paths", namespace="trombi", app_name="trombi") ), - url( + re_path( + r"^matmatronch/", + include("matmat.re_paths", namespace="matmat", app_name="matmat"), + ), + re_path( r"^pedagogy/", - include("pedagogy.urls", namespace="pedagogy", app_name="pedagogy"), + include("pedagogy.re_paths", namespace="pedagogy", app_name="pedagogy"), ), - url(r"^admin/", include(admin.site.urls)), - url(r"^ajax_select/", include(ajax_select_urls)), - url(r"^i18n/", include("django.conf.urls.i18n")), - url(r"^jsi18n/$", javascript_catalog, js_info_dict, name="javascript-catalog"), - url(r"^captcha/", include("captcha.urls")), + re_path(r"^admin/", include(admin.site.re_paths)), + re_path(r"^ajax_select/", include(ajax_select_re_paths)), + re_path(r"^i18n/", include("django.urls.i18n")), + re_path(r"^jsi18n/$", javascript_catalog, js_info_dict, name="javascript-catalog"), + re_path(r"^captcha/", include("captcha.re_paths")), ] if settings.DEBUG: @@ -100,4 +113,4 @@ if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) import debug_toolbar - urlpatterns += [url(r"^__debug__/", include(debug_toolbar.urls))] + urlpatterns += [re_path(r"^__debug__/", include(debug_toolbar.urls))] diff --git a/stock/urls.py b/stock/urls.py index ac85d147..59bc466b 100644 --- a/stock/urls.py +++ b/stock/urls.py @@ -23,64 +23,66 @@ # # -from django.conf.urls import include, url +from django.urls import include, re_path from stock.views import * urlpatterns = [ - # Stock urls - url(r"^new/counter/(?P[0-9]+)$", StockCreateView.as_view(), name="new"), - url(r"^edit/(?P[0-9]+)$", StockEditView.as_view(), name="edit"), - url(r"^list$", StockListView.as_view(), name="list"), - # StockItem urls - url(r"^(?P[0-9]+)$", StockItemList.as_view(), name="items_list"), - url( + # Stock re_paths + re_path( + r"^new/counter/(?P[0-9]+)$", StockCreateView.as_view(), name="new" + ), + re_path(r"^edit/(?P[0-9]+)$", StockEditView.as_view(), name="edit"), + re_path(r"^list$", StockListView.as_view(), name="list"), + # StockItem re_paths + re_path(r"^(?P[0-9]+)$", StockItemList.as_view(), name="items_list"), + re_path( r"^(?P[0-9]+)/stock_item/new_item$", StockItemCreateView.as_view(), name="new_item", ), - url( + re_path( r"^stock_item/(?P[0-9]+)/edit$", StockItemEditView.as_view(), name="edit_item", ), - url( + re_path( r"^(?P[0-9]+)/stock_item/take_items$", StockTakeItemsBaseFormView.as_view(), name="take_items", ), - # ShoppingList urls - url( + # ShoppingList re_paths + re_path( r"^(?P[0-9]+)/shopping_list/list$", StockShoppingListView.as_view(), name="shoppinglist_list", ), - url( + re_path( r"^(?P[0-9]+)/shopping_list/create$", StockItemQuantityBaseFormView.as_view(), name="shoppinglist_create", ), - url( + re_path( r"^(?P[0-9]+)/shopping_list/(?P[0-9]+)/items$", StockShoppingListItemListView.as_view(), name="shoppinglist_items", ), - url( + re_path( r"^(?P[0-9]+)/shopping_list/(?P[0-9]+)/delete$", StockShoppingListDeleteView.as_view(), name="shoppinglist_delete", ), - url( + re_path( r"^(?P[0-9]+)/shopping_list/(?P[0-9]+)/set_done$", StockShopppingListSetDone.as_view(), name="shoppinglist_set_done", ), - url( + re_path( r"^(?P[0-9]+)/shopping_list/(?P[0-9]+)/set_todo$", StockShopppingListSetTodo.as_view(), name="shoppinglist_set_todo", ), - url( + re_path( r"^(?P[0-9]+)/shopping_list/(?P[0-9]+)/update_stock$", StockUpdateAfterShopppingBaseFormView.as_view(), name="update_after_shopping", diff --git a/subscription/urls.py b/subscription/urls.py index e271c0e1..d398197a 100644 --- a/subscription/urls.py +++ b/subscription/urls.py @@ -22,12 +22,12 @@ # # -from django.conf.urls import url +from django.urls import re_path from subscription.views import * urlpatterns = [ # Subscription views - url(r"^$", NewSubscription.as_view(), name="subscription"), - url(r"stats", SubscriptionsStatsView.as_view(), name="stats"), + re_path(r"^$", NewSubscription.as_view(), name="subscription"), + re_path(r"stats", SubscriptionsStatsView.as_view(), name="stats"), ] diff --git a/trombi/urls.py b/trombi/urls.py index a20b2722..76575ef9 100644 --- a/trombi/urls.py +++ b/trombi/urls.py @@ -22,59 +22,61 @@ # # -from django.conf.urls import url +from django.urls import re_path from trombi.views import * urlpatterns = [ - url(r"^(?P[0-9]+)/new$", TrombiCreateView.as_view(), name="create"), - url(r"^(?P[0-9]+)/export$", TrombiExportView.as_view(), name="export"), - url(r"^(?P[0-9]+)/edit$", TrombiEditView.as_view(), name="edit"), - url( + re_path(r"^(?P[0-9]+)/new$", TrombiCreateView.as_view(), name="create"), + re_path( + r"^(?P[0-9]+)/export$", TrombiExportView.as_view(), name="export" + ), + re_path(r"^(?P[0-9]+)/edit$", TrombiEditView.as_view(), name="edit"), + re_path( r"^(?P[0-9]+)/moderate_comments$", TrombiModerateCommentsView.as_view(), name="moderate_comments", ), - url( + re_path( r"^(?P[0-9]+)/moderate$", TrombiModerateCommentView.as_view(), name="moderate_comment", ), - url( + re_path( r"^user/(?P[0-9]+)/delete$", TrombiDeleteUserView.as_view(), name="delete_user", ), - url(r"^(?P[0-9]+)$", TrombiDetailView.as_view(), name="detail"), - url( + re_path(r"^(?P[0-9]+)$", TrombiDetailView.as_view(), name="detail"), + re_path( r"^(?P[0-9]+)/new_comment$", TrombiCommentCreateView.as_view(), name="new_comment", ), - url( + re_path( r"^(?P[0-9]+)/profile$", UserTrombiProfileView.as_view(), name="user_profile", ), - url( + re_path( r"^comment/(?P[0-9]+)/edit$", TrombiCommentEditView.as_view(), name="edit_comment", ), - url(r"^tools$", UserTrombiToolsView.as_view(), name="user_tools"), - url(r"^profile$", UserTrombiEditProfileView.as_view(), name="profile"), - url(r"^pictures$", UserTrombiEditPicturesView.as_view(), name="pictures"), - url( + re_path(r"^tools$", UserTrombiToolsView.as_view(), name="user_tools"), + re_path(r"^profile$", UserTrombiEditProfileView.as_view(), name="profile"), + re_path(r"^pictures$", UserTrombiEditPicturesView.as_view(), name="pictures"), + re_path( r"^reset_memberships$", UserTrombiResetClubMembershipsView.as_view(), name="reset_memberships", ), - url( + re_path( r"^membership/(?P[0-9]+)/edit$", UserTrombiEditMembershipView.as_view(), name="edit_membership", ), - url( + re_path( r"^membership/(?P[0-9]+)/delete$", UserTrombiDeleteMembershipView.as_view(), name="delete_membership",