django2.2: migrate url to re_path

This commit is contained in:
Antoine Bartuccio 2019-10-05 18:14:41 +02:00
parent 7be9077fce
commit be855c6c90
Signed by: klmp200
GPG Key ID: E7245548C53F904B
19 changed files with 387 additions and 342 deletions

View File

@ -22,131 +22,133 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from accounting.views import * from accounting.views import *
urlpatterns = [ urlpatterns = [
# Accounting types # Accounting types
url( re_path(
r"^simple_type$", r"^simple_type$",
SimplifiedAccountingTypeListView.as_view(), SimplifiedAccountingTypeListView.as_view(),
name="simple_type_list", name="simple_type_list",
), ),
url( re_path(
r"^simple_type/create$", r"^simple_type/create$",
SimplifiedAccountingTypeCreateView.as_view(), SimplifiedAccountingTypeCreateView.as_view(),
name="simple_type_new", name="simple_type_new",
), ),
url( re_path(
r"^simple_type/(?P<type_id>[0-9]+)/edit$", r"^simple_type/(?P<type_id>[0-9]+)/edit$",
SimplifiedAccountingTypeEditView.as_view(), SimplifiedAccountingTypeEditView.as_view(),
name="simple_type_edit", name="simple_type_edit",
), ),
# Accounting types # Accounting types
url(r"^type$", AccountingTypeListView.as_view(), name="type_list"), re_path(r"^type$", AccountingTypeListView.as_view(), name="type_list"),
url(r"^type/create$", AccountingTypeCreateView.as_view(), name="type_new"), re_path(r"^type/create$", AccountingTypeCreateView.as_view(), name="type_new"),
url( re_path(
r"^type/(?P<type_id>[0-9]+)/edit$", r"^type/(?P<type_id>[0-9]+)/edit$",
AccountingTypeEditView.as_view(), AccountingTypeEditView.as_view(),
name="type_edit", name="type_edit",
), ),
# Bank accounts # Bank accounts
url(r"^$", BankAccountListView.as_view(), name="bank_list"), re_path(r"^$", BankAccountListView.as_view(), name="bank_list"),
url(r"^bank/create$", BankAccountCreateView.as_view(), name="bank_new"), re_path(r"^bank/create$", BankAccountCreateView.as_view(), name="bank_new"),
url( re_path(
r"^bank/(?P<b_account_id>[0-9]+)$", r"^bank/(?P<b_account_id>[0-9]+)$",
BankAccountDetailView.as_view(), BankAccountDetailView.as_view(),
name="bank_details", name="bank_details",
), ),
url( re_path(
r"^bank/(?P<b_account_id>[0-9]+)/edit$", r"^bank/(?P<b_account_id>[0-9]+)/edit$",
BankAccountEditView.as_view(), BankAccountEditView.as_view(),
name="bank_edit", name="bank_edit",
), ),
url( re_path(
r"^bank/(?P<b_account_id>[0-9]+)/delete$", r"^bank/(?P<b_account_id>[0-9]+)/delete$",
BankAccountDeleteView.as_view(), BankAccountDeleteView.as_view(),
name="bank_delete", name="bank_delete",
), ),
# Club accounts # Club accounts
url(r"^club/create$", ClubAccountCreateView.as_view(), name="club_new"), re_path(r"^club/create$", ClubAccountCreateView.as_view(), name="club_new"),
url( re_path(
r"^club/(?P<c_account_id>[0-9]+)$", r"^club/(?P<c_account_id>[0-9]+)$",
ClubAccountDetailView.as_view(), ClubAccountDetailView.as_view(),
name="club_details", name="club_details",
), ),
url( re_path(
r"^club/(?P<c_account_id>[0-9]+)/edit$", r"^club/(?P<c_account_id>[0-9]+)/edit$",
ClubAccountEditView.as_view(), ClubAccountEditView.as_view(),
name="club_edit", name="club_edit",
), ),
url( re_path(
r"^club/(?P<c_account_id>[0-9]+)/delete$", r"^club/(?P<c_account_id>[0-9]+)/delete$",
ClubAccountDeleteView.as_view(), ClubAccountDeleteView.as_view(),
name="club_delete", name="club_delete",
), ),
# Journals # Journals
url(r"^journal/create$", JournalCreateView.as_view(), name="journal_new"), re_path(r"^journal/create$", JournalCreateView.as_view(), name="journal_new"),
url( re_path(
r"^journal/(?P<j_id>[0-9]+)$", r"^journal/(?P<j_id>[0-9]+)$",
JournalDetailView.as_view(), JournalDetailView.as_view(),
name="journal_details", name="journal_details",
), ),
url( re_path(
r"^journal/(?P<j_id>[0-9]+)/edit$", r"^journal/(?P<j_id>[0-9]+)/edit$",
JournalEditView.as_view(), JournalEditView.as_view(),
name="journal_edit", name="journal_edit",
), ),
url( re_path(
r"^journal/(?P<j_id>[0-9]+)/delete$", r"^journal/(?P<j_id>[0-9]+)/delete$",
JournalDeleteView.as_view(), JournalDeleteView.as_view(),
name="journal_delete", name="journal_delete",
), ),
url( re_path(
r"^journal/(?P<j_id>[0-9]+)/statement/nature$", r"^journal/(?P<j_id>[0-9]+)/statement/nature$",
JournalNatureStatementView.as_view(), JournalNatureStatementView.as_view(),
name="journal_nature_statement", name="journal_nature_statement",
), ),
url( re_path(
r"^journal/(?P<j_id>[0-9]+)/statement/person$", r"^journal/(?P<j_id>[0-9]+)/statement/person$",
JournalPersonStatementView.as_view(), JournalPersonStatementView.as_view(),
name="journal_person_statement", name="journal_person_statement",
), ),
url( re_path(
r"^journal/(?P<j_id>[0-9]+)/statement/accounting$", r"^journal/(?P<j_id>[0-9]+)/statement/accounting$",
JournalAccountingStatementView.as_view(), JournalAccountingStatementView.as_view(),
name="journal_accounting_statement", name="journal_accounting_statement",
), ),
# Operations # Operations
url( re_path(
r"^operation/create/(?P<j_id>[0-9]+)$", r"^operation/create/(?P<j_id>[0-9]+)$",
OperationCreateView.as_view(), OperationCreateView.as_view(),
name="op_new", name="op_new",
), ),
url(r"^operation/(?P<op_id>[0-9]+)$", OperationEditView.as_view(), name="op_edit"), re_path(
url( r"^operation/(?P<op_id>[0-9]+)$", OperationEditView.as_view(), name="op_edit"
),
re_path(
r"^operation/(?P<op_id>[0-9]+)/pdf$", OperationPDFView.as_view(), name="op_pdf" r"^operation/(?P<op_id>[0-9]+)/pdf$", OperationPDFView.as_view(), name="op_pdf"
), ),
# Companies # Companies
url(r"^company/list$", CompanyListView.as_view(), name="co_list"), re_path(r"^company/list$", CompanyListView.as_view(), name="co_list"),
url(r"^company/create$", CompanyCreateView.as_view(), name="co_new"), re_path(r"^company/create$", CompanyCreateView.as_view(), name="co_new"),
url(r"^company/(?P<co_id>[0-9]+)$", CompanyEditView.as_view(), name="co_edit"), re_path(r"^company/(?P<co_id>[0-9]+)$", CompanyEditView.as_view(), name="co_edit"),
# Labels # Labels
url(r"^label/new$", LabelCreateView.as_view(), name="label_new"), re_path(r"^label/new$", LabelCreateView.as_view(), name="label_new"),
url( re_path(
r"^label/(?P<clubaccount_id>[0-9]+)$", r"^label/(?P<clubaccount_id>[0-9]+)$",
LabelListView.as_view(), LabelListView.as_view(),
name="label_list", name="label_list",
), ),
url( re_path(
r"^label/(?P<label_id>[0-9]+)/edit$", LabelEditView.as_view(), name="label_edit" r"^label/(?P<label_id>[0-9]+)/edit$", LabelEditView.as_view(), name="label_edit"
), ),
url( re_path(
r"^label/(?P<label_id>[0-9]+)/delete$", r"^label/(?P<label_id>[0-9]+)/delete$",
LabelDeleteView.as_view(), LabelDeleteView.as_view(),
name="label_delete", name="label_delete",
), ),
# User account # User account
url(r"^refound/account$", RefoundAccountView.as_view(), name="refound_account"), re_path(r"^refound/account$", RefoundAccountView.as_view(), name="refound_account"),
] ]

View File

@ -22,7 +22,7 @@
# #
# #
from django.conf.urls import url, include from django.urls import re_path, include
from api.views import * from api.views import *
from rest_framework import routers from rest_framework import routers
@ -49,8 +49,8 @@ router.register(
urlpatterns = [ urlpatterns = [
# API # API
url(r"^", include(router.urls)), re_path(r"^", include(router.urls)),
url(r"^login/", include("rest_framework.urls", namespace="rest_framework")), re_path(r"^login/", include("rest_framework.re_paths", namespace="rest_framework")),
url(r"^markdown$", RenderMarkdown, name="api_markdown"), re_path(r"^markdown$", RenderMarkdown, name="api_markdown"),
url(r"^mailings$", FetchMailingLists, name="mailings_fetch"), re_path(r"^mailings$", FetchMailingLists, name="mailings_fetch"),
] ]

View File

@ -23,80 +23,88 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from club.views import * from club.views import *
urlpatterns = [ urlpatterns = [
url(r"^$", ClubListView.as_view(), name="club_list"), re_path(r"^$", ClubListView.as_view(), name="club_list"),
url(r"^new$", ClubCreateView.as_view(), name="club_new"), re_path(r"^new$", ClubCreateView.as_view(), name="club_new"),
url(r"^stats$", ClubStatView.as_view(), name="club_stats"), re_path(r"^stats$", ClubStatView.as_view(), name="club_stats"),
url(r"^(?P<club_id>[0-9]+)/$", ClubView.as_view(), name="club_view"), re_path(r"^(?P<club_id>[0-9]+)/$", ClubView.as_view(), name="club_view"),
url( re_path(
r"^(?P<club_id>[0-9]+)/rev/(?P<rev_id>[0-9]+)/$", r"^(?P<club_id>[0-9]+)/rev/(?P<rev_id>[0-9]+)/$",
ClubRevView.as_view(), ClubRevView.as_view(),
name="club_view_rev", name="club_view_rev",
), ),
url(r"^(?P<club_id>[0-9]+)/hist$", ClubPageHistView.as_view(), name="club_hist"), re_path(
url(r"^(?P<club_id>[0-9]+)/edit$", ClubEditView.as_view(), name="club_edit"), r"^(?P<club_id>[0-9]+)/hist$", ClubPageHistView.as_view(), name="club_hist"
url( ),
re_path(r"^(?P<club_id>[0-9]+)/edit$", ClubEditView.as_view(), name="club_edit"),
re_path(
r"^(?P<club_id>[0-9]+)/edit/page$", r"^(?P<club_id>[0-9]+)/edit/page$",
ClubPageEditView.as_view(), ClubPageEditView.as_view(),
name="club_edit_page", name="club_edit_page",
), ),
url( re_path(
r"^(?P<club_id>[0-9]+)/members$", ClubMembersView.as_view(), name="club_members" r"^(?P<club_id>[0-9]+)/members$", ClubMembersView.as_view(), name="club_members"
), ),
url( re_path(
r"^(?P<club_id>[0-9]+)/elderlies$", r"^(?P<club_id>[0-9]+)/elderlies$",
ClubOldMembersView.as_view(), ClubOldMembersView.as_view(),
name="club_old_members", name="club_old_members",
), ),
url( re_path(
r"^(?P<club_id>[0-9]+)/sellings$", r"^(?P<club_id>[0-9]+)/sellings$",
ClubSellingView.as_view(), ClubSellingView.as_view(),
name="club_sellings", name="club_sellings",
), ),
url( re_path(
r"^(?P<club_id>[0-9]+)/sellings/csv$", r"^(?P<club_id>[0-9]+)/sellings/csv$",
ClubSellingCSVView.as_view(), ClubSellingCSVView.as_view(),
name="sellings_csv", name="sellings_csv",
), ),
url(r"^(?P<club_id>[0-9]+)/prop$", ClubEditPropView.as_view(), name="club_prop"), re_path(
url(r"^(?P<club_id>[0-9]+)/tools$", ClubToolsView.as_view(), name="tools"), r"^(?P<club_id>[0-9]+)/prop$", ClubEditPropView.as_view(), name="club_prop"
url(r"^(?P<club_id>[0-9]+)/mailing$", ClubMailingView.as_view(), name="mailing"), ),
url( re_path(r"^(?P<club_id>[0-9]+)/tools$", ClubToolsView.as_view(), name="tools"),
re_path(
r"^(?P<club_id>[0-9]+)/mailing$", ClubMailingView.as_view(), name="mailing"
),
re_path(
r"^(?P<mailing_id>[0-9]+)/mailing/generate$", r"^(?P<mailing_id>[0-9]+)/mailing/generate$",
MailingAutoGenerationView.as_view(), MailingAutoGenerationView.as_view(),
name="mailing_generate", name="mailing_generate",
), ),
url( re_path(
r"^(?P<mailing_id>[0-9]+)/mailing/delete$", r"^(?P<mailing_id>[0-9]+)/mailing/delete$",
MailingDeleteView.as_view(), MailingDeleteView.as_view(),
name="mailing_delete", name="mailing_delete",
), ),
url( re_path(
r"^(?P<mailing_subscription_id>[0-9]+)/mailing/delete/subscription$", r"^(?P<mailing_subscription_id>[0-9]+)/mailing/delete/subscription$",
MailingSubscriptionDeleteView.as_view(), MailingSubscriptionDeleteView.as_view(),
name="mailing_subscription_delete", name="mailing_subscription_delete",
), ),
url( re_path(
r"^membership/(?P<membership_id>[0-9]+)/set_old$", r"^membership/(?P<membership_id>[0-9]+)/set_old$",
MembershipSetOldView.as_view(), MembershipSetOldView.as_view(),
name="membership_set_old", name="membership_set_old",
), ),
url(r"^(?P<club_id>[0-9]+)/poster$", PosterListView.as_view(), name="poster_list"), re_path(
url( r"^(?P<club_id>[0-9]+)/poster$", PosterListView.as_view(), name="poster_list"
),
re_path(
r"^(?P<club_id>[0-9]+)/poster/create$", r"^(?P<club_id>[0-9]+)/poster/create$",
PosterCreateView.as_view(), PosterCreateView.as_view(),
name="poster_create", name="poster_create",
), ),
url( re_path(
r"^(?P<club_id>[0-9]+)/poster/(?P<poster_id>[0-9]+)/edit$", r"^(?P<club_id>[0-9]+)/poster/(?P<poster_id>[0-9]+)/edit$",
PosterEditView.as_view(), PosterEditView.as_view(),
name="poster_edit", name="poster_edit",
), ),
url( re_path(
r"^(?P<club_id>[0-9]+)/poster/(?P<poster_id>[0-9]+)/delete$", r"^(?P<club_id>[0-9]+)/poster/(?P<poster_id>[0-9]+)/delete$",
PosterDeleteView.as_view(), PosterDeleteView.as_view(),
name="poster_delete", name="poster_delete",

View File

@ -22,97 +22,103 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from com.views import * from com.views import *
from club.views import MailingDeleteView from club.views import MailingDeleteView
urlpatterns = [ urlpatterns = [
url(r"^sith/edit/alert$", AlertMsgEditView.as_view(), name="alert_edit"), re_path(r"^sith/edit/alert$", AlertMsgEditView.as_view(), name="alert_edit"),
url(r"^sith/edit/info$", InfoMsgEditView.as_view(), name="info_edit"), re_path(r"^sith/edit/info$", InfoMsgEditView.as_view(), name="info_edit"),
url( re_path(
r"^sith/edit/weekmail_destinations$", r"^sith/edit/weekmail_destinations$",
WeekmailDestinationEditView.as_view(), WeekmailDestinationEditView.as_view(),
name="weekmail_destinations", name="weekmail_destinations",
), ),
url(r"^weekmail$", WeekmailEditView.as_view(), name="weekmail"), re_path(r"^weekmail$", WeekmailEditView.as_view(), name="weekmail"),
url(r"^weekmail/preview$", WeekmailPreviewView.as_view(), name="weekmail_preview"), re_path(
url( r"^weekmail/preview$", WeekmailPreviewView.as_view(), name="weekmail_preview"
),
re_path(
r"^weekmail/new_article$", r"^weekmail/new_article$",
WeekmailArticleCreateView.as_view(), WeekmailArticleCreateView.as_view(),
name="weekmail_article", name="weekmail_article",
), ),
url( re_path(
r"^weekmail/article/(?P<article_id>[0-9]+)/delete$", r"^weekmail/article/(?P<article_id>[0-9]+)/delete$",
WeekmailArticleDeleteView.as_view(), WeekmailArticleDeleteView.as_view(),
name="weekmail_article_delete", name="weekmail_article_delete",
), ),
url( re_path(
r"^weekmail/article/(?P<article_id>[0-9]+)/edit$", r"^weekmail/article/(?P<article_id>[0-9]+)/edit$",
WeekmailArticleEditView.as_view(), WeekmailArticleEditView.as_view(),
name="weekmail_article_edit", name="weekmail_article_edit",
), ),
url(r"^news$", NewsListView.as_view(), name="news_list"), re_path(r"^news$", NewsListView.as_view(), name="news_list"),
url(r"^news/admin$", NewsAdminListView.as_view(), name="news_admin_list"), re_path(r"^news/admin$", NewsAdminListView.as_view(), name="news_admin_list"),
url(r"^news/create$", NewsCreateView.as_view(), name="news_new"), re_path(r"^news/create$", NewsCreateView.as_view(), name="news_new"),
url( re_path(
r"^news/(?P<news_id>[0-9]+)/delete$", r"^news/(?P<news_id>[0-9]+)/delete$",
NewsDeleteView.as_view(), NewsDeleteView.as_view(),
name="news_delete", name="news_delete",
), ),
url( re_path(
r"^news/(?P<news_id>[0-9]+)/moderate$", r"^news/(?P<news_id>[0-9]+)/moderate$",
NewsModerateView.as_view(), NewsModerateView.as_view(),
name="news_moderate", name="news_moderate",
), ),
url(r"^news/(?P<news_id>[0-9]+)/edit$", NewsEditView.as_view(), name="news_edit"), re_path(
url(r"^news/(?P<news_id>[0-9]+)$", NewsDetailView.as_view(), name="news_detail"), r"^news/(?P<news_id>[0-9]+)/edit$", NewsEditView.as_view(), name="news_edit"
url(r"^mailings$", MailingListAdminView.as_view(), name="mailing_admin"), ),
url( re_path(
r"^news/(?P<news_id>[0-9]+)$", NewsDetailView.as_view(), name="news_detail"
),
re_path(r"^mailings$", MailingListAdminView.as_view(), name="mailing_admin"),
re_path(
r"^mailings/(?P<mailing_id>[0-9]+)/moderate$", r"^mailings/(?P<mailing_id>[0-9]+)/moderate$",
MailingModerateView.as_view(), MailingModerateView.as_view(),
name="mailing_moderate", name="mailing_moderate",
), ),
url( re_path(
r"^mailings/(?P<mailing_id>[0-9]+)/delete$", r"^mailings/(?P<mailing_id>[0-9]+)/delete$",
MailingDeleteView.as_view(redirect_page="com:mailing_admin"), MailingDeleteView.as_view(redirect_page="com:mailing_admin"),
name="mailing_delete", name="mailing_delete",
), ),
url(r"^poster$", PosterListView.as_view(), name="poster_list"), re_path(r"^poster$", PosterListView.as_view(), name="poster_list"),
url(r"^poster/create$", PosterCreateView.as_view(), name="poster_create"), re_path(r"^poster/create$", PosterCreateView.as_view(), name="poster_create"),
url( re_path(
r"^poster/(?P<poster_id>[0-9]+)/edit$", r"^poster/(?P<poster_id>[0-9]+)/edit$",
PosterEditView.as_view(), PosterEditView.as_view(),
name="poster_edit", name="poster_edit",
), ),
url( re_path(
r"^poster/(?P<poster_id>[0-9]+)/delete$", r"^poster/(?P<poster_id>[0-9]+)/delete$",
PosterDeleteView.as_view(), PosterDeleteView.as_view(),
name="poster_delete", name="poster_delete",
), ),
url( re_path(
r"^poster/moderate$", r"^poster/moderate$",
PosterModerateListView.as_view(), PosterModerateListView.as_view(),
name="poster_moderate_list", name="poster_moderate_list",
), ),
url( re_path(
r"^poster/(?P<object_id>[0-9]+)/moderate$", r"^poster/(?P<object_id>[0-9]+)/moderate$",
PosterModerateView.as_view(), PosterModerateView.as_view(),
name="poster_moderate", name="poster_moderate",
), ),
url(r"^screen$", ScreenListView.as_view(), name="screen_list"), re_path(r"^screen$", ScreenListView.as_view(), name="screen_list"),
url(r"^screen/create$", ScreenCreateView.as_view(), name="screen_create"), re_path(r"^screen/create$", ScreenCreateView.as_view(), name="screen_create"),
url( re_path(
r"^screen/(?P<screen_id>[0-9]+)/slideshow$", r"^screen/(?P<screen_id>[0-9]+)/slideshow$",
ScreenSlideshowView.as_view(), ScreenSlideshowView.as_view(),
name="screen_slideshow", name="screen_slideshow",
), ),
url( re_path(
r"^screen/(?P<screen_id>[0-9]+)/edit$", r"^screen/(?P<screen_id>[0-9]+)/edit$",
ScreenEditView.as_view(), ScreenEditView.as_view(),
name="screen_edit", name="screen_edit",
), ),
url( re_path(
r"^screen/(?P<screen_id>[0-9]+)/delete$", r"^screen/(?P<screen_id>[0-9]+)/delete$",
ScreenDeleteView.as_view(), ScreenDeleteView.as_view(),
name="screen_delete", name="screen_delete",

View File

@ -23,189 +23,195 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from core.views import * from core.views import *
urlpatterns = [ urlpatterns = [
url(r"^$", index, name="index"), re_path(r"^$", index, name="index"),
url(r"^to_markdown$", ToMarkdownView.as_view(), name="to_markdown"), re_path(r"^to_markdown$", ToMarkdownView.as_view(), name="to_markdown"),
url(r"^notifications$", NotificationList.as_view(), name="notification_list"), re_path(r"^notifications$", NotificationList.as_view(), name="notification_list"),
url(r"^notification/(?P<notif_id>[0-9]+)$", notification, name="notification"), re_path(r"^notification/(?P<notif_id>[0-9]+)$", notification, name="notification"),
# Search # Search
url(r"^search/$", search_view, name="search"), re_path(r"^search/$", search_view, name="search"),
url(r"^search_json/$", search_json, name="search_json"), re_path(r"^search_json/$", search_json, name="search_json"),
url(r"^search_user/$", search_user_json, name="search_user"), re_path(r"^search_user/$", search_user_json, name="search_user"),
# Login and co # Login and co
url(r"^login/$", login, name="login"), re_path(r"^login/$", login, name="login"),
url(r"^logout/$", logout, name="logout"), re_path(r"^logout/$", logout, name="logout"),
url(r"^password_change/$", password_change, name="password_change"), re_path(r"^password_change/$", password_change, name="password_change"),
url( re_path(
r"^password_change/(?P<user_id>[0-9]+)$", r"^password_change/(?P<user_id>[0-9]+)$",
password_root_change, password_root_change,
name="password_root_change", name="password_root_change",
), ),
url(r"^password_change/done$", password_change_done, name="password_change_done"), re_path(
url(r"^password_reset/$", password_reset, name="password_reset"), r"^password_change/done$", password_change_done, name="password_change_done"
url(r"^password_reset/done$", password_reset_done, name="password_reset_done"), ),
url( 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<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$", r"^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$",
password_reset_confirm, password_reset_confirm,
name="password_reset_confirm", name="password_reset_confirm",
), ),
url(r"^reset/done/$", password_reset_complete, name="password_reset_complete"), re_path(r"^reset/done/$", password_reset_complete, name="password_reset_complete"),
url(r"^register$", register, name="register"), re_path(r"^register$", register, name="register"),
# Group handling # Group handling
url(r"^group/$", GroupListView.as_view(), name="group_list"), re_path(r"^group/$", GroupListView.as_view(), name="group_list"),
url(r"^group/new$", GroupCreateView.as_view(), name="group_new"), re_path(r"^group/new$", GroupCreateView.as_view(), name="group_new"),
url(r"^group/(?P<group_id>[0-9]+)/$", GroupEditView.as_view(), name="group_edit"), re_path(
url( r"^group/(?P<group_id>[0-9]+)/$", GroupEditView.as_view(), name="group_edit"
),
re_path(
r"^group/(?P<group_id>[0-9]+)/delete$", r"^group/(?P<group_id>[0-9]+)/delete$",
GroupDeleteView.as_view(), GroupDeleteView.as_view(),
name="group_delete", name="group_delete",
), ),
url( re_path(
r"^group/(?P<group_id>[0-9]+)/detail$", r"^group/(?P<group_id>[0-9]+)/detail$",
GroupTemplateView.as_view(), GroupTemplateView.as_view(),
name="group_detail", name="group_detail",
), ),
# User views # User views
url(r"^user/$", UserListView.as_view(), name="user_list"), re_path(r"^user/$", UserListView.as_view(), name="user_list"),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/mini$", r"^user/(?P<user_id>[0-9]+)/mini$",
UserMiniView.as_view(), UserMiniView.as_view(),
name="user_profile_mini", name="user_profile_mini",
), ),
url(r"^user/(?P<user_id>[0-9]+)/$", UserView.as_view(), name="user_profile"), re_path(r"^user/(?P<user_id>[0-9]+)/$", UserView.as_view(), name="user_profile"),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/pictures$", r"^user/(?P<user_id>[0-9]+)/pictures$",
UserPicturesView.as_view(), UserPicturesView.as_view(),
name="user_pictures", name="user_pictures",
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/godfathers$", r"^user/(?P<user_id>[0-9]+)/godfathers$",
UserGodfathersView.as_view(), UserGodfathersView.as_view(),
name="user_godfathers", name="user_godfathers",
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/godfathers/tree$", r"^user/(?P<user_id>[0-9]+)/godfathers/tree$",
UserGodfathersTreeView.as_view(), UserGodfathersTreeView.as_view(),
name="user_godfathers_tree", name="user_godfathers_tree",
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/godfathers/tree/pict$", r"^user/(?P<user_id>[0-9]+)/godfathers/tree/pict$",
UserGodfathersTreePictureView.as_view(), UserGodfathersTreePictureView.as_view(),
name="user_godfathers_tree_pict", name="user_godfathers_tree_pict",
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/godfathers/(?P<godfather_id>[0-9]+)/(?P<is_father>(True)|(False))/delete$", r"^user/(?P<user_id>[0-9]+)/godfathers/(?P<godfather_id>[0-9]+)/(?P<is_father>(True)|(False))/delete$",
DeleteUserGodfathers, DeleteUserGodfathers,
name="user_godfathers_delete", name="user_godfathers_delete",
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/edit$", r"^user/(?P<user_id>[0-9]+)/edit$",
UserUpdateProfileView.as_view(), UserUpdateProfileView.as_view(),
name="user_edit", name="user_edit",
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/profile_upload$", r"^user/(?P<user_id>[0-9]+)/profile_upload$",
UserUploadProfilePictView.as_view(), UserUploadProfilePictView.as_view(),
name="user_profile_upload", name="user_profile_upload",
), ),
url(r"^user/(?P<user_id>[0-9]+)/clubs$", UserClubView.as_view(), name="user_clubs"), re_path(
url( r"^user/(?P<user_id>[0-9]+)/clubs$", UserClubView.as_view(), name="user_clubs"
),
re_path(
r"^user/(?P<user_id>[0-9]+)/prefs$", r"^user/(?P<user_id>[0-9]+)/prefs$",
UserPreferencesView.as_view(), UserPreferencesView.as_view(),
name="user_prefs", name="user_prefs",
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/groups$", r"^user/(?P<user_id>[0-9]+)/groups$",
UserUpdateGroupView.as_view(), UserUpdateGroupView.as_view(),
name="user_groups", name="user_groups",
), ),
url(r"^user/tools/$", UserToolsView.as_view(), name="user_tools"), re_path(r"^user/tools/$", UserToolsView.as_view(), name="user_tools"),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/account$", r"^user/(?P<user_id>[0-9]+)/account$",
UserAccountView.as_view(), UserAccountView.as_view(),
name="user_account", name="user_account",
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/account/(?P<year>[0-9]+)/(?P<month>[0-9]+)$", r"^user/(?P<user_id>[0-9]+)/account/(?P<year>[0-9]+)/(?P<month>[0-9]+)$",
UserAccountDetailView.as_view(), UserAccountDetailView.as_view(),
name="user_account_detail", name="user_account_detail",
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/stats$", UserStatsView.as_view(), name="user_stats" r"^user/(?P<user_id>[0-9]+)/stats$", UserStatsView.as_view(), name="user_stats"
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/gift/create$", r"^user/(?P<user_id>[0-9]+)/gift/create$",
GiftCreateView.as_view(), GiftCreateView.as_view(),
name="user_gift_create", name="user_gift_create",
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/gift/delete/(?P<gift_id>[0-9]+)/$", r"^user/(?P<user_id>[0-9]+)/gift/delete/(?P<gift_id>[0-9]+)/$",
GiftDeleteView.as_view(), GiftDeleteView.as_view(),
name="user_gift_delete", name="user_gift_delete",
), ),
# File views # File views
# url(r'^file/add/(?P<popup>popup)?$', FileCreateView.as_view(), name='file_new'), # re_path(r'^file/add/(?P<popup>popup)?$', FileCreateView.as_view(), name='file_new'),
url(r"^file/(?P<popup>popup)?$", FileListView.as_view(), name="file_list"), re_path(r"^file/(?P<popup>popup)?$", FileListView.as_view(), name="file_list"),
url( re_path(
r"^file/(?P<file_id>[0-9]+)/(?P<popup>popup)?$", r"^file/(?P<file_id>[0-9]+)/(?P<popup>popup)?$",
FileView.as_view(), FileView.as_view(),
name="file_detail", name="file_detail",
), ),
url( re_path(
r"^file/(?P<file_id>[0-9]+)/edit/(?P<popup>popup)?$", r"^file/(?P<file_id>[0-9]+)/edit/(?P<popup>popup)?$",
FileEditView.as_view(), FileEditView.as_view(),
name="file_edit", name="file_edit",
), ),
url( re_path(
r"^file/(?P<file_id>[0-9]+)/prop/(?P<popup>popup)?$", r"^file/(?P<file_id>[0-9]+)/prop/(?P<popup>popup)?$",
FileEditPropView.as_view(), FileEditPropView.as_view(),
name="file_prop", name="file_prop",
), ),
url( re_path(
r"^file/(?P<file_id>[0-9]+)/delete/(?P<popup>popup)?$", r"^file/(?P<file_id>[0-9]+)/delete/(?P<popup>popup)?$",
FileDeleteView.as_view(), FileDeleteView.as_view(),
name="file_delete", name="file_delete",
), ),
url(r"^file/moderation$", FileModerationView.as_view(), name="file_moderation"), re_path(r"^file/moderation$", FileModerationView.as_view(), name="file_moderation"),
url( re_path(
r"^file/(?P<file_id>[0-9]+)/moderate$", r"^file/(?P<file_id>[0-9]+)/moderate$",
FileModerateView.as_view(), FileModerateView.as_view(),
name="file_moderate", name="file_moderate",
), ),
url(r"^file/(?P<file_id>[0-9]+)/download$", send_file, name="download"), re_path(r"^file/(?P<file_id>[0-9]+)/download$", send_file, name="download"),
# Page views # Page views
url(r"^page/$", PageListView.as_view(), name="page_list"), re_path(r"^page/$", PageListView.as_view(), name="page_list"),
url(r"^page/create$", PageCreateView.as_view(), name="page_new"), re_path(r"^page/create$", PageCreateView.as_view(), name="page_new"),
url( re_path(
r"^page/(?P<page_id>[0-9]*)/delete$", r"^page/(?P<page_id>[0-9]*)/delete$",
PageDeleteView.as_view(), PageDeleteView.as_view(),
name="page_delete", name="page_delete",
), ),
url( re_path(
r"^page/(?P<page_name>([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/edit$", r"^page/(?P<page_name>([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/edit$",
PageEditView.as_view(), PageEditView.as_view(),
name="page_edit", name="page_edit",
), ),
url( re_path(
r"^page/(?P<page_name>([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/prop$", r"^page/(?P<page_name>([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/prop$",
PagePropView.as_view(), PagePropView.as_view(),
name="page_prop", name="page_prop",
), ),
url( re_path(
r"^page/(?P<page_name>([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/hist$", r"^page/(?P<page_name>([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/hist$",
PageHistView.as_view(), PageHistView.as_view(),
name="page_hist", name="page_hist",
), ),
url( re_path(
r"^page/(?P<page_name>([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/rev/(?P<rev>[0-9]+)/", r"^page/(?P<page_name>([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/rev/(?P<rev>[0-9]+)/",
PageRevView.as_view(), PageRevView.as_view(),
name="page_rev", name="page_rev",
), ),
url( re_path(
r"^page/(?P<page_name>([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/$", r"^page/(?P<page_name>([/a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])+)/$",
PageView.as_view(), PageView.as_view(),
name="page", name="page",

View File

@ -22,119 +22,119 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from counter.views import * from counter.views import *
urlpatterns = [ urlpatterns = [
url(r"^(?P<counter_id>[0-9]+)$", CounterMain.as_view(), name="details"), re_path(r"^(?P<counter_id>[0-9]+)$", CounterMain.as_view(), name="details"),
url( re_path(
r"^(?P<counter_id>[0-9]+)/click/(?P<user_id>[0-9]+)$", r"^(?P<counter_id>[0-9]+)/click/(?P<user_id>[0-9]+)$",
CounterClick.as_view(), CounterClick.as_view(),
name="click", name="click",
), ),
url( re_path(
r"^(?P<counter_id>[0-9]+)/last_ops$", r"^(?P<counter_id>[0-9]+)/last_ops$",
CounterLastOperationsView.as_view(), CounterLastOperationsView.as_view(),
name="last_ops", name="last_ops",
), ),
url( re_path(
r"^(?P<counter_id>[0-9]+)/cash_summary$", r"^(?P<counter_id>[0-9]+)/cash_summary$",
CounterCashSummaryView.as_view(), CounterCashSummaryView.as_view(),
name="cash_summary", name="cash_summary",
), ),
url( re_path(
r"^(?P<counter_id>[0-9]+)/activity$", r"^(?P<counter_id>[0-9]+)/activity$",
CounterActivityView.as_view(), CounterActivityView.as_view(),
name="activity", name="activity",
), ),
url(r"^(?P<counter_id>[0-9]+)/stats$", CounterStatView.as_view(), name="stats"), re_path(r"^(?P<counter_id>[0-9]+)/stats$", CounterStatView.as_view(), name="stats"),
url(r"^(?P<counter_id>[0-9]+)/login$", CounterLogin.as_view(), name="login"), re_path(r"^(?P<counter_id>[0-9]+)/login$", CounterLogin.as_view(), name="login"),
url(r"^(?P<counter_id>[0-9]+)/logout$", CounterLogout.as_view(), name="logout"), re_path(r"^(?P<counter_id>[0-9]+)/logout$", CounterLogout.as_view(), name="logout"),
url( re_path(
r"^eticket/(?P<selling_id>[0-9]+)/pdf$", r"^eticket/(?P<selling_id>[0-9]+)/pdf$",
EticketPDFView.as_view(), EticketPDFView.as_view(),
name="eticket_pdf", name="eticket_pdf",
), ),
url( re_path(
r"^customer/(?P<customer_id>[0-9]+)/card/add$", r"^customer/(?P<customer_id>[0-9]+)/card/add$",
StudentCardFormView.as_view(), StudentCardFormView.as_view(),
name="add_student_card", name="add_student_card",
), ),
url( re_path(
r"^customer/(?P<customer_id>[0-9]+)/card/delete/(?P<card_id>[0-9]+)/$", r"^customer/(?P<customer_id>[0-9]+)/card/delete/(?P<card_id>[0-9]+)/$",
StudentCardDeleteView.as_view(), StudentCardDeleteView.as_view(),
name="delete_student_card", name="delete_student_card",
), ),
url(r"^admin/(?P<counter_id>[0-9]+)$", CounterEditView.as_view(), name="admin"), re_path(r"^admin/(?P<counter_id>[0-9]+)$", CounterEditView.as_view(), name="admin"),
url( re_path(
r"^admin/(?P<counter_id>[0-9]+)/prop$", r"^admin/(?P<counter_id>[0-9]+)/prop$",
CounterEditPropView.as_view(), CounterEditPropView.as_view(),
name="prop_admin", name="prop_admin",
), ),
url(r"^admin$", CounterListView.as_view(), name="admin_list"), re_path(r"^admin$", CounterListView.as_view(), name="admin_list"),
url(r"^admin/new$", CounterCreateView.as_view(), name="new"), re_path(r"^admin/new$", CounterCreateView.as_view(), name="new"),
url( re_path(
r"^admin/delete/(?P<counter_id>[0-9]+)$", r"^admin/delete/(?P<counter_id>[0-9]+)$",
CounterDeleteView.as_view(), CounterDeleteView.as_view(),
name="delete", name="delete",
), ),
url(r"^admin/invoices_call$", InvoiceCallView.as_view(), name="invoices_call"), re_path(r"^admin/invoices_call$", InvoiceCallView.as_view(), name="invoices_call"),
url( re_path(
r"^admin/cash_summary/list$", r"^admin/cash_summary/list$",
CashSummaryListView.as_view(), CashSummaryListView.as_view(),
name="cash_summary_list", name="cash_summary_list",
), ),
url( re_path(
r"^admin/cash_summary/(?P<cashsummary_id>[0-9]+)$", r"^admin/cash_summary/(?P<cashsummary_id>[0-9]+)$",
CashSummaryEditView.as_view(), CashSummaryEditView.as_view(),
name="cash_summary_edit", name="cash_summary_edit",
), ),
url(r"^admin/product/list$", ProductListView.as_view(), name="product_list"), re_path(r"^admin/product/list$", ProductListView.as_view(), name="product_list"),
url( re_path(
r"^admin/product/list_archived$", r"^admin/product/list_archived$",
ProductArchivedListView.as_view(), ProductArchivedListView.as_view(),
name="product_list_archived", name="product_list_archived",
), ),
url(r"^admin/product/create$", ProductCreateView.as_view(), name="new_product"), re_path(r"^admin/product/create$", ProductCreateView.as_view(), name="new_product"),
url( re_path(
r"^admin/product/(?P<product_id>[0-9]+)$", r"^admin/product/(?P<product_id>[0-9]+)$",
ProductEditView.as_view(), ProductEditView.as_view(),
name="product_edit", name="product_edit",
), ),
url( re_path(
r"^admin/producttype/list$", r"^admin/producttype/list$",
ProductTypeListView.as_view(), ProductTypeListView.as_view(),
name="producttype_list", name="producttype_list",
), ),
url( re_path(
r"^admin/producttype/create$", r"^admin/producttype/create$",
ProductTypeCreateView.as_view(), ProductTypeCreateView.as_view(),
name="new_producttype", name="new_producttype",
), ),
url( re_path(
r"^admin/producttype/(?P<type_id>[0-9]+)$", r"^admin/producttype/(?P<type_id>[0-9]+)$",
ProductTypeEditView.as_view(), ProductTypeEditView.as_view(),
name="producttype_edit", name="producttype_edit",
), ),
url(r"^admin/eticket/list$", EticketListView.as_view(), name="eticket_list"), re_path(r"^admin/eticket/list$", EticketListView.as_view(), name="eticket_list"),
url(r"^admin/eticket/new$", EticketCreateView.as_view(), name="new_eticket"), re_path(r"^admin/eticket/new$", EticketCreateView.as_view(), name="new_eticket"),
url( re_path(
r"^admin/eticket/(?P<eticket_id>[0-9]+)$", r"^admin/eticket/(?P<eticket_id>[0-9]+)$",
EticketEditView.as_view(), EticketEditView.as_view(),
name="edit_eticket", name="edit_eticket",
), ),
url( re_path(
r"^admin/selling/(?P<selling_id>[0-9]+)/delete$", r"^admin/selling/(?P<selling_id>[0-9]+)/delete$",
SellingDeleteView.as_view(), SellingDeleteView.as_view(),
name="selling_delete", name="selling_delete",
), ),
url( re_path(
r"^admin/refilling/(?P<refilling_id>[0-9]+)/delete$", r"^admin/refilling/(?P<refilling_id>[0-9]+)/delete$",
RefillingDeleteView.as_view(), RefillingDeleteView.as_view(),
name="refilling_delete", name="refilling_delete",
), ),
url( re_path(
r"^admin/(?P<counter_id>[0-9]+)/refillings$", r"^admin/(?P<counter_id>[0-9]+)/refillings$",
CounterRefillingListView.as_view(), CounterRefillingListView.as_view(),
name="refilling_list", name="refilling_list",

View File

@ -22,16 +22,16 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from eboutic.views import * from eboutic.views import *
urlpatterns = [ urlpatterns = [
# Subscription views # Subscription views
url(r"^$", EbouticMain.as_view(), name="main"), re_path(r"^$", EbouticMain.as_view(), name="main"),
url(r"^command$", EbouticCommand.as_view(), name="command"), re_path(r"^command$", EbouticCommand.as_view(), name="command"),
url(r"^pay$", EbouticPayWithSith.as_view(), name="pay_with_sith"), re_path(r"^pay$", EbouticPayWithSith.as_view(), name="pay_with_sith"),
url( re_path(
r"^et_autoanswer$", r"^et_autoanswer$",
EtransactionAutoAnswer.as_view(), EtransactionAutoAnswer.as_view(),
name="etransation_autoanswer", name="etransation_autoanswer",

View File

@ -1,55 +1,57 @@
from django.conf.urls import url from django.urls import re_path
from election.views import * from election.views import *
urlpatterns = [ urlpatterns = [
url(r"^$", ElectionsListView.as_view(), name="list"), re_path(r"^$", ElectionsListView.as_view(), name="list"),
url(r"^archived$", ElectionListArchivedView.as_view(), name="list_archived"), re_path(r"^archived$", ElectionListArchivedView.as_view(), name="list_archived"),
url(r"^add$", ElectionCreateView.as_view(), name="create"), re_path(r"^add$", ElectionCreateView.as_view(), name="create"),
url(r"^(?P<election_id>[0-9]+)/edit$", ElectionUpdateView.as_view(), name="update"), re_path(
url( r"^(?P<election_id>[0-9]+)/edit$", ElectionUpdateView.as_view(), name="update"
),
re_path(
r"^(?P<election_id>[0-9]+)/delete$", ElectionDeleteView.as_view(), name="delete" r"^(?P<election_id>[0-9]+)/delete$", ElectionDeleteView.as_view(), name="delete"
), ),
url( re_path(
r"^(?P<election_id>[0-9]+)/list/add$", r"^(?P<election_id>[0-9]+)/list/add$",
ElectionListCreateView.as_view(), ElectionListCreateView.as_view(),
name="create_list", name="create_list",
), ),
url( re_path(
r"^(?P<list_id>[0-9]+)/list/delete$", r"^(?P<list_id>[0-9]+)/list/delete$",
ElectionListDeleteView.as_view(), ElectionListDeleteView.as_view(),
name="delete_list", name="delete_list",
), ),
url( re_path(
r"^(?P<election_id>[0-9]+)/role/create$", r"^(?P<election_id>[0-9]+)/role/create$",
RoleCreateView.as_view(), RoleCreateView.as_view(),
name="create_role", name="create_role",
), ),
url( re_path(
r"^(?P<role_id>[0-9]+)/role/edit$", RoleUpdateView.as_view(), name="update_role" r"^(?P<role_id>[0-9]+)/role/edit$", RoleUpdateView.as_view(), name="update_role"
), ),
url( re_path(
r"^(?P<role_id>[0-9]+)/role/delete$", r"^(?P<role_id>[0-9]+)/role/delete$",
RoleDeleteView.as_view(), RoleDeleteView.as_view(),
name="delete_role", name="delete_role",
), ),
url( re_path(
r"^(?P<election_id>[0-9]+)/candidate/add$", r"^(?P<election_id>[0-9]+)/candidate/add$",
CandidatureCreateView.as_view(), CandidatureCreateView.as_view(),
name="candidate", name="candidate",
), ),
url( re_path(
r"^(?P<candidature_id>[0-9]+)/candidate/edit$", r"^(?P<candidature_id>[0-9]+)/candidate/edit$",
CandidatureUpdateView.as_view(), CandidatureUpdateView.as_view(),
name="update_candidate", name="update_candidate",
), ),
url( re_path(
r"^(?P<candidature_id>[0-9]+)/candidate/delete$", r"^(?P<candidature_id>[0-9]+)/candidate/delete$",
CandidatureDeleteView.as_view(), CandidatureDeleteView.as_view(),
name="delete_candidate", name="delete_candidate",
), ),
url(r"^(?P<election_id>[0-9]+)/vote$", VoteFormView.as_view(), name="vote"), re_path(r"^(?P<election_id>[0-9]+)/vote$", VoteFormView.as_view(), name="vote"),
url( re_path(
r"^(?P<election_id>[0-9]+)/detail$", ElectionDetailView.as_view(), name="detail" r"^(?P<election_id>[0-9]+)/detail$", ElectionDetailView.as_view(), name="detail"
), ),
] ]

View File

@ -22,64 +22,68 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from forum.views import * from forum.views import *
urlpatterns = [ urlpatterns = [
url(r"^$", ForumMainView.as_view(), name="main"), re_path(r"^$", ForumMainView.as_view(), name="main"),
url(r"^search/$", ForumSearchView.as_view(), name="search"), re_path(r"^search/$", ForumSearchView.as_view(), name="search"),
url(r"^new_forum$", ForumCreateView.as_view(), name="new_forum"), re_path(r"^new_forum$", ForumCreateView.as_view(), name="new_forum"),
url(r"^mark_all_as_read$", ForumMarkAllAsRead.as_view(), name="mark_all_as_read"), re_path(
url(r"^last_unread$", ForumLastUnread.as_view(), name="last_unread"), r"^mark_all_as_read$", ForumMarkAllAsRead.as_view(), name="mark_all_as_read"
url(r"^favorite_topics$", ForumFavoriteTopics.as_view(), name="favorite_topics"), ),
url(r"^(?P<forum_id>[0-9]+)$", ForumDetailView.as_view(), name="view_forum"), re_path(r"^last_unread$", ForumLastUnread.as_view(), name="last_unread"),
url(r"^(?P<forum_id>[0-9]+)/edit$", ForumEditView.as_view(), name="edit_forum"), re_path(
url( r"^favorite_topics$", ForumFavoriteTopics.as_view(), name="favorite_topics"
),
re_path(r"^(?P<forum_id>[0-9]+)$", ForumDetailView.as_view(), name="view_forum"),
re_path(r"^(?P<forum_id>[0-9]+)/edit$", ForumEditView.as_view(), name="edit_forum"),
re_path(
r"^(?P<forum_id>[0-9]+)/delete$", ForumDeleteView.as_view(), name="delete_forum" r"^(?P<forum_id>[0-9]+)/delete$", ForumDeleteView.as_view(), name="delete_forum"
), ),
url( re_path(
r"^(?P<forum_id>[0-9]+)/new_topic$", r"^(?P<forum_id>[0-9]+)/new_topic$",
ForumTopicCreateView.as_view(), ForumTopicCreateView.as_view(),
name="new_topic", name="new_topic",
), ),
url( re_path(
r"^topic/(?P<topic_id>[0-9]+)$", r"^topic/(?P<topic_id>[0-9]+)$",
ForumTopicDetailView.as_view(), ForumTopicDetailView.as_view(),
name="view_topic", name="view_topic",
), ),
url( re_path(
r"^topic/(?P<topic_id>[0-9]+)/edit$", r"^topic/(?P<topic_id>[0-9]+)/edit$",
ForumTopicEditView.as_view(), ForumTopicEditView.as_view(),
name="edit_topic", name="edit_topic",
), ),
url( re_path(
r"^topic/(?P<topic_id>[0-9]+)/new_message$", r"^topic/(?P<topic_id>[0-9]+)/new_message$",
ForumMessageCreateView.as_view(), ForumMessageCreateView.as_view(),
name="new_message", name="new_message",
), ),
url( re_path(
r"^topic/(?P<topic_id>[0-9]+)/toggle_subscribe$", r"^topic/(?P<topic_id>[0-9]+)/toggle_subscribe$",
ForumTopicSubscribeView.as_view(), ForumTopicSubscribeView.as_view(),
name="toggle_subscribe_topic", name="toggle_subscribe_topic",
), ),
url( re_path(
r"^message/(?P<message_id>[0-9]+)$", r"^message/(?P<message_id>[0-9]+)$",
ForumMessageView.as_view(), ForumMessageView.as_view(),
name="view_message", name="view_message",
), ),
url( re_path(
r"^message/(?P<message_id>[0-9]+)/edit$", r"^message/(?P<message_id>[0-9]+)/edit$",
ForumMessageEditView.as_view(), ForumMessageEditView.as_view(),
name="edit_message", name="edit_message",
), ),
url( re_path(
r"^message/(?P<message_id>[0-9]+)/delete$", r"^message/(?P<message_id>[0-9]+)/delete$",
ForumMessageDeleteView.as_view(), ForumMessageDeleteView.as_view(),
name="delete_message", name="delete_message",
), ),
url( re_path(
r"^message/(?P<message_id>[0-9]+)/undelete$", r"^message/(?P<message_id>[0-9]+)/undelete$",
ForumMessageUndeleteView.as_view(), ForumMessageUndeleteView.as_view(),
name="undelete_message", name="undelete_message",

View File

@ -22,53 +22,53 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from launderette.views import * from launderette.views import *
urlpatterns = [ urlpatterns = [
# views # views
url(r"^$", LaunderetteMainView.as_view(), name="launderette_main"), re_path(r"^$", LaunderetteMainView.as_view(), name="launderette_main"),
url( re_path(
r"^slot/(?P<slot_id>[0-9]+)/delete$", r"^slot/(?P<slot_id>[0-9]+)/delete$",
SlotDeleteView.as_view(), SlotDeleteView.as_view(),
name="delete_slot", name="delete_slot",
), ),
url(r"^book$", LaunderetteBookMainView.as_view(), name="book_main"), re_path(r"^book$", LaunderetteBookMainView.as_view(), name="book_main"),
url( re_path(
r"^book/(?P<launderette_id>[0-9]+)$", r"^book/(?P<launderette_id>[0-9]+)$",
LaunderetteBookView.as_view(), LaunderetteBookView.as_view(),
name="book_slot", name="book_slot",
), ),
url( re_path(
r"^(?P<launderette_id>[0-9]+)/click$", r"^(?P<launderette_id>[0-9]+)/click$",
LaunderetteMainClickView.as_view(), LaunderetteMainClickView.as_view(),
name="main_click", name="main_click",
), ),
url( re_path(
r"^(?P<launderette_id>[0-9]+)/click/(?P<user_id>[0-9]+)$", r"^(?P<launderette_id>[0-9]+)/click/(?P<user_id>[0-9]+)$",
LaunderetteClickView.as_view(), LaunderetteClickView.as_view(),
name="click", name="click",
), ),
url(r"^admin$", LaunderetteListView.as_view(), name="launderette_list"), re_path(r"^admin$", LaunderetteListView.as_view(), name="launderette_list"),
url( re_path(
r"^admin/(?P<launderette_id>[0-9]+)$", r"^admin/(?P<launderette_id>[0-9]+)$",
LaunderetteAdminView.as_view(), LaunderetteAdminView.as_view(),
name="launderette_admin", name="launderette_admin",
), ),
url( re_path(
r"^admin/(?P<launderette_id>[0-9]+)/edit$", r"^admin/(?P<launderette_id>[0-9]+)/edit$",
LaunderetteEditView.as_view(), LaunderetteEditView.as_view(),
name="launderette_edit", name="launderette_edit",
), ),
url(r"^admin/new$", LaunderetteCreateView.as_view(), name="launderette_new"), re_path(r"^admin/new$", LaunderetteCreateView.as_view(), name="launderette_new"),
url(r"^admin/machine/new$", MachineCreateView.as_view(), name="machine_new"), re_path(r"^admin/machine/new$", MachineCreateView.as_view(), name="machine_new"),
url( re_path(
r"^admin/machine/(?P<machine_id>[0-9]+)/edit$", r"^admin/machine/(?P<machine_id>[0-9]+)/edit$",
MachineEditView.as_view(), MachineEditView.as_view(),
name="machine_edit", name="machine_edit",
), ),
url( re_path(
r"^admin/machine/(?P<machine_id>[0-9]+)/delete$", r"^admin/machine/(?P<machine_id>[0-9]+)/delete$",
MachineDeleteView.as_view(), MachineDeleteView.as_view(),
name="machine_delete", name="machine_delete",

View File

@ -22,13 +22,13 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from matmat.views import * from matmat.views import *
urlpatterns = [ urlpatterns = [
url(r"^$", SearchNormalFormView.as_view(), name="search"), re_path(r"^$", SearchNormalFormView.as_view(), name="search"),
url(r"^reverse$", SearchReverseFormView.as_view(), name="search_reverse"), re_path(r"^reverse$", SearchReverseFormView.as_view(), name="search_reverse"),
url(r"^quick$", SearchQuickFormView.as_view(), name="search_quick"), re_path(r"^quick$", SearchQuickFormView.as_view(), name="search_quick"),
url(r"^clear$", SearchClearFormView.as_view(), name="search_clear"), re_path(r"^clear$", SearchClearFormView.as_view(), name="search_clear"),
] ]

View File

@ -22,33 +22,33 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from pedagogy.views import * from pedagogy.views import *
urlpatterns = [ urlpatterns = [
# Urls displaying the actual application for visitors # Urls displaying the actual application for visitors
url(r"^$", UVListView.as_view(), name="guide"), re_path(r"^$", UVListView.as_view(), name="guide"),
url(r"^uv/(?P<uv_id>[0-9]+)$", UVDetailFormView.as_view(), name="uv_detail"), re_path(r"^uv/(?P<uv_id>[0-9]+)$", UVDetailFormView.as_view(), name="uv_detail"),
url( re_path(
r"^comment/(?P<comment_id>[0-9]+)/edit$", r"^comment/(?P<comment_id>[0-9]+)/edit$",
UVCommentUpdateView.as_view(), UVCommentUpdateView.as_view(),
name="comment_update", name="comment_update",
), ),
url( re_path(
r"^comment/(?P<comment_id>[0-9]+)/delete$", r"^comment/(?P<comment_id>[0-9]+)/delete$",
UVCommentDeleteView.as_view(), UVCommentDeleteView.as_view(),
name="comment_delete", name="comment_delete",
), ),
url( re_path(
r"^comment/(?P<comment_id>[0-9]+)/report$", r"^comment/(?P<comment_id>[0-9]+)/report$",
UVCommentReportCreateView.as_view(), UVCommentReportCreateView.as_view(),
name="comment_report", name="comment_report",
), ),
# Moderation # Moderation
url(r"^moderation$", UVModerationFormView.as_view(), name="moderation"), re_path(r"^moderation$", UVModerationFormView.as_view(), name="moderation"),
# Administration : Create Update Delete Edit # Administration : Create Update Delete Edit
url(r"^uv/create$", UVCreateView.as_view(), name="uv_create"), re_path(r"^uv/create$", UVCreateView.as_view(), name="uv_create"),
url(r"^uv/(?P<uv_id>[0-9]+)/delete$", UVDeleteView.as_view(), name="uv_delete"), re_path(r"^uv/(?P<uv_id>[0-9]+)/delete$", UVDeleteView.as_view(), name="uv_delete"),
url(r"^uv/(?P<uv_id>[0-9]+)/edit$", UVUpdateView.as_view(), name="uv_update"), re_path(r"^uv/(?P<uv_id>[0-9]+)/edit$", UVUpdateView.as_view(), name="uv_update"),
] ]

View File

@ -1,5 +1,5 @@
# Django 1.11 LTS is required # Django 1.11 LTS is required
Django >=1.11, <2.0 Django >=2.2, <3.0
Pillow Pillow
mistune mistune
django-jinja django-jinja

View File

@ -22,13 +22,13 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from rootplace.views import * from rootplace.views import *
urlpatterns = [ urlpatterns = [
url(r"^merge$", MergeUsersView.as_view(), name="merge"), re_path(r"^merge$", MergeUsersView.as_view(), name="merge"),
url( re_path(
r"^forum/messages/delete$", r"^forum/messages/delete$",
DeleteAllForumUserMessagesView.as_view(), DeleteAllForumUserMessagesView.as_view(),
name="delete_forum_messages", name="delete_forum_messages",

View File

@ -22,40 +22,40 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from sas.views import * from sas.views import *
urlpatterns = [ urlpatterns = [
url(r"^$", SASMainView.as_view(), name="main"), re_path(r"^$", SASMainView.as_view(), name="main"),
url(r"^moderation$", ModerationView.as_view(), name="moderation"), re_path(r"^moderation$", ModerationView.as_view(), name="moderation"),
url(r"^album/(?P<album_id>[0-9]+)$", AlbumView.as_view(), name="album"), re_path(r"^album/(?P<album_id>[0-9]+)$", AlbumView.as_view(), name="album"),
url( re_path(
r"^album/(?P<album_id>[0-9]+)/upload$", r"^album/(?P<album_id>[0-9]+)/upload$",
AlbumUploadView.as_view(), AlbumUploadView.as_view(),
name="album_upload", name="album_upload",
), ),
url( re_path(
r"^album/(?P<album_id>[0-9]+)/edit$", AlbumEditView.as_view(), name="album_edit" r"^album/(?P<album_id>[0-9]+)/edit$", AlbumEditView.as_view(), name="album_edit"
), ),
url(r"^album/(?P<album_id>[0-9]+)/preview$", send_album, name="album_preview"), re_path(r"^album/(?P<album_id>[0-9]+)/preview$", send_album, name="album_preview"),
url(r"^picture/(?P<picture_id>[0-9]+)$", PictureView.as_view(), name="picture"), re_path(r"^picture/(?P<picture_id>[0-9]+)$", PictureView.as_view(), name="picture"),
url( re_path(
r"^picture/(?P<picture_id>[0-9]+)/edit$", r"^picture/(?P<picture_id>[0-9]+)/edit$",
PictureEditView.as_view(), PictureEditView.as_view(),
name="picture_edit", name="picture_edit",
), ),
url(r"^picture/(?P<picture_id>[0-9]+)/download$", send_pict, name="download"), re_path(r"^picture/(?P<picture_id>[0-9]+)/download$", send_pict, name="download"),
url( re_path(
r"^picture/(?P<picture_id>[0-9]+)/download/compressed$", r"^picture/(?P<picture_id>[0-9]+)/download/compressed$",
send_compressed, send_compressed,
name="download_compressed", name="download_compressed",
), ),
url( re_path(
r"^picture/(?P<picture_id>[0-9]+)/download/thumb$", r"^picture/(?P<picture_id>[0-9]+)/download/thumb$",
send_thumb, send_thumb,
name="download_thumb", name="download_thumb",
), ),
# url(r'^album/new$', AlbumCreateView.as_view(), name='album_new'), # re_path(r'^album/new$', AlbumCreateView.as_view(), name='album_new'),
# url(r'^(?P<club_id>[0-9]+)/$', ClubView.as_view(), name='club_view'), # re_path(r'^(?P<club_id>[0-9]+)/$', ClubView.as_view(), name='club_view'),
] ]

View File

@ -37,9 +37,9 @@ Including another URLconf
1. Add an import: from blog import urls as blog_urls 1. Add an import: from blog import urls as blog_urls
2. Add a URL to urlpatterns: url(r'^blog/', include(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.contrib import admin
from django.conf.urls.static import static from django.urls.static import static
from django.conf import settings from django.conf import settings
from django.views.i18n import javascript_catalog from django.views.i18n import javascript_catalog
from ajax_select import urls as ajax_select_urls from ajax_select import urls as ajax_select_urls
@ -51,48 +51,61 @@ handler404 = "core.views.not_found"
handler500 = "core.views.internal_servor_error" handler500 = "core.views.internal_servor_error"
urlpatterns = [ urlpatterns = [
url(r"^", include("core.urls", namespace="core", app_name="core")), re_path(r"^", include("core.re_paths", namespace="core", app_name="core")),
url( re_path(
r"^rootplace/", r"^rootplace/",
include("rootplace.urls", namespace="rootplace", app_name="rootplace"), include("rootplace.re_paths", namespace="rootplace", app_name="rootplace"),
), ),
url( re_path(
r"^subscription/", 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")), re_path(r"^com/", include("com.re_paths", namespace="com", app_name="com")),
url(r"^counter/", include("counter.urls", namespace="counter", app_name="counter")), re_path(r"^club/", include("club.re_paths", namespace="club", app_name="club")),
url(r"^stock/", include("stock.urls", namespace="stock", app_name="stock")), re_path(
url( 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/", 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")), re_path(
url( r"^eboutic/",
include("eboutic.re_paths", namespace="eboutic", app_name="eboutic"),
),
re_path(
r"^launderette/", 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")), re_path(r"^sas/", include("sas.re_paths", namespace="sas", app_name="sas")),
url( re_path(r"^api/v1/", include("api.re_paths", namespace="api", app_name="api")),
re_path(
r"^election/", 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")), re_path(r"^forum/", include("forum.re_paths", namespace="forum", app_name="forum")),
url(r"^trombi/", include("trombi.urls", namespace="trombi", app_name="trombi")), re_path(
url( r"^trombi/", include("trombi.re_paths", namespace="trombi", app_name="trombi")
r"^matmatronch/", include("matmat.urls", namespace="matmat", app_name="matmat")
), ),
url( re_path(
r"^matmatronch/",
include("matmat.re_paths", namespace="matmat", app_name="matmat"),
),
re_path(
r"^pedagogy/", 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)), re_path(r"^admin/", include(admin.site.re_paths)),
url(r"^ajax_select/", include(ajax_select_urls)), re_path(r"^ajax_select/", include(ajax_select_re_paths)),
url(r"^i18n/", include("django.conf.urls.i18n")), re_path(r"^i18n/", include("django.urls.i18n")),
url(r"^jsi18n/$", javascript_catalog, js_info_dict, name="javascript-catalog"), re_path(r"^jsi18n/$", javascript_catalog, js_info_dict, name="javascript-catalog"),
url(r"^captcha/", include("captcha.urls")), re_path(r"^captcha/", include("captcha.re_paths")),
] ]
if settings.DEBUG: if settings.DEBUG:
@ -100,4 +113,4 @@ if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
import debug_toolbar import debug_toolbar
urlpatterns += [url(r"^__debug__/", include(debug_toolbar.urls))] urlpatterns += [re_path(r"^__debug__/", include(debug_toolbar.urls))]

View File

@ -23,64 +23,66 @@
# #
# #
from django.conf.urls import include, url from django.urls import include, re_path
from stock.views import * from stock.views import *
urlpatterns = [ urlpatterns = [
# Stock urls # Stock re_paths
url(r"^new/counter/(?P<counter_id>[0-9]+)$", StockCreateView.as_view(), name="new"), re_path(
url(r"^edit/(?P<stock_id>[0-9]+)$", StockEditView.as_view(), name="edit"), r"^new/counter/(?P<counter_id>[0-9]+)$", StockCreateView.as_view(), name="new"
url(r"^list$", StockListView.as_view(), name="list"), ),
# StockItem urls re_path(r"^edit/(?P<stock_id>[0-9]+)$", StockEditView.as_view(), name="edit"),
url(r"^(?P<stock_id>[0-9]+)$", StockItemList.as_view(), name="items_list"), re_path(r"^list$", StockListView.as_view(), name="list"),
url( # StockItem re_paths
re_path(r"^(?P<stock_id>[0-9]+)$", StockItemList.as_view(), name="items_list"),
re_path(
r"^(?P<stock_id>[0-9]+)/stock_item/new_item$", r"^(?P<stock_id>[0-9]+)/stock_item/new_item$",
StockItemCreateView.as_view(), StockItemCreateView.as_view(),
name="new_item", name="new_item",
), ),
url( re_path(
r"^stock_item/(?P<item_id>[0-9]+)/edit$", r"^stock_item/(?P<item_id>[0-9]+)/edit$",
StockItemEditView.as_view(), StockItemEditView.as_view(),
name="edit_item", name="edit_item",
), ),
url( re_path(
r"^(?P<stock_id>[0-9]+)/stock_item/take_items$", r"^(?P<stock_id>[0-9]+)/stock_item/take_items$",
StockTakeItemsBaseFormView.as_view(), StockTakeItemsBaseFormView.as_view(),
name="take_items", name="take_items",
), ),
# ShoppingList urls # ShoppingList re_paths
url( re_path(
r"^(?P<stock_id>[0-9]+)/shopping_list/list$", r"^(?P<stock_id>[0-9]+)/shopping_list/list$",
StockShoppingListView.as_view(), StockShoppingListView.as_view(),
name="shoppinglist_list", name="shoppinglist_list",
), ),
url( re_path(
r"^(?P<stock_id>[0-9]+)/shopping_list/create$", r"^(?P<stock_id>[0-9]+)/shopping_list/create$",
StockItemQuantityBaseFormView.as_view(), StockItemQuantityBaseFormView.as_view(),
name="shoppinglist_create", name="shoppinglist_create",
), ),
url( re_path(
r"^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/items$", r"^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/items$",
StockShoppingListItemListView.as_view(), StockShoppingListItemListView.as_view(),
name="shoppinglist_items", name="shoppinglist_items",
), ),
url( re_path(
r"^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/delete$", r"^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/delete$",
StockShoppingListDeleteView.as_view(), StockShoppingListDeleteView.as_view(),
name="shoppinglist_delete", name="shoppinglist_delete",
), ),
url( re_path(
r"^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/set_done$", r"^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/set_done$",
StockShopppingListSetDone.as_view(), StockShopppingListSetDone.as_view(),
name="shoppinglist_set_done", name="shoppinglist_set_done",
), ),
url( re_path(
r"^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/set_todo$", r"^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/set_todo$",
StockShopppingListSetTodo.as_view(), StockShopppingListSetTodo.as_view(),
name="shoppinglist_set_todo", name="shoppinglist_set_todo",
), ),
url( re_path(
r"^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/update_stock$", r"^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/update_stock$",
StockUpdateAfterShopppingBaseFormView.as_view(), StockUpdateAfterShopppingBaseFormView.as_view(),
name="update_after_shopping", name="update_after_shopping",

View File

@ -22,12 +22,12 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from subscription.views import * from subscription.views import *
urlpatterns = [ urlpatterns = [
# Subscription views # Subscription views
url(r"^$", NewSubscription.as_view(), name="subscription"), re_path(r"^$", NewSubscription.as_view(), name="subscription"),
url(r"stats", SubscriptionsStatsView.as_view(), name="stats"), re_path(r"stats", SubscriptionsStatsView.as_view(), name="stats"),
] ]

View File

@ -22,59 +22,61 @@
# #
# #
from django.conf.urls import url from django.urls import re_path
from trombi.views import * from trombi.views import *
urlpatterns = [ urlpatterns = [
url(r"^(?P<club_id>[0-9]+)/new$", TrombiCreateView.as_view(), name="create"), re_path(r"^(?P<club_id>[0-9]+)/new$", TrombiCreateView.as_view(), name="create"),
url(r"^(?P<trombi_id>[0-9]+)/export$", TrombiExportView.as_view(), name="export"), re_path(
url(r"^(?P<trombi_id>[0-9]+)/edit$", TrombiEditView.as_view(), name="edit"), r"^(?P<trombi_id>[0-9]+)/export$", TrombiExportView.as_view(), name="export"
url( ),
re_path(r"^(?P<trombi_id>[0-9]+)/edit$", TrombiEditView.as_view(), name="edit"),
re_path(
r"^(?P<trombi_id>[0-9]+)/moderate_comments$", r"^(?P<trombi_id>[0-9]+)/moderate_comments$",
TrombiModerateCommentsView.as_view(), TrombiModerateCommentsView.as_view(),
name="moderate_comments", name="moderate_comments",
), ),
url( re_path(
r"^(?P<comment_id>[0-9]+)/moderate$", r"^(?P<comment_id>[0-9]+)/moderate$",
TrombiModerateCommentView.as_view(), TrombiModerateCommentView.as_view(),
name="moderate_comment", name="moderate_comment",
), ),
url( re_path(
r"^user/(?P<user_id>[0-9]+)/delete$", r"^user/(?P<user_id>[0-9]+)/delete$",
TrombiDeleteUserView.as_view(), TrombiDeleteUserView.as_view(),
name="delete_user", name="delete_user",
), ),
url(r"^(?P<trombi_id>[0-9]+)$", TrombiDetailView.as_view(), name="detail"), re_path(r"^(?P<trombi_id>[0-9]+)$", TrombiDetailView.as_view(), name="detail"),
url( re_path(
r"^(?P<user_id>[0-9]+)/new_comment$", r"^(?P<user_id>[0-9]+)/new_comment$",
TrombiCommentCreateView.as_view(), TrombiCommentCreateView.as_view(),
name="new_comment", name="new_comment",
), ),
url( re_path(
r"^(?P<user_id>[0-9]+)/profile$", r"^(?P<user_id>[0-9]+)/profile$",
UserTrombiProfileView.as_view(), UserTrombiProfileView.as_view(),
name="user_profile", name="user_profile",
), ),
url( re_path(
r"^comment/(?P<comment_id>[0-9]+)/edit$", r"^comment/(?P<comment_id>[0-9]+)/edit$",
TrombiCommentEditView.as_view(), TrombiCommentEditView.as_view(),
name="edit_comment", name="edit_comment",
), ),
url(r"^tools$", UserTrombiToolsView.as_view(), name="user_tools"), re_path(r"^tools$", UserTrombiToolsView.as_view(), name="user_tools"),
url(r"^profile$", UserTrombiEditProfileView.as_view(), name="profile"), re_path(r"^profile$", UserTrombiEditProfileView.as_view(), name="profile"),
url(r"^pictures$", UserTrombiEditPicturesView.as_view(), name="pictures"), re_path(r"^pictures$", UserTrombiEditPicturesView.as_view(), name="pictures"),
url( re_path(
r"^reset_memberships$", r"^reset_memberships$",
UserTrombiResetClubMembershipsView.as_view(), UserTrombiResetClubMembershipsView.as_view(),
name="reset_memberships", name="reset_memberships",
), ),
url( re_path(
r"^membership/(?P<membership_id>[0-9]+)/edit$", r"^membership/(?P<membership_id>[0-9]+)/edit$",
UserTrombiEditMembershipView.as_view(), UserTrombiEditMembershipView.as_view(),
name="edit_membership", name="edit_membership",
), ),
url( re_path(
r"^membership/(?P<membership_id>[0-9]+)/delete$", r"^membership/(?P<membership_id>[0-9]+)/delete$",
UserTrombiDeleteMembershipView.as_view(), UserTrombiDeleteMembershipView.as_view(),
name="delete_membership", name="delete_membership",