mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
django2.2: migrate url to re_path
This commit is contained in:
@ -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<type_id>[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<type_id>[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<b_account_id>[0-9]+)$",
|
||||
BankAccountDetailView.as_view(),
|
||||
name="bank_details",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^bank/(?P<b_account_id>[0-9]+)/edit$",
|
||||
BankAccountEditView.as_view(),
|
||||
name="bank_edit",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^bank/(?P<b_account_id>[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<c_account_id>[0-9]+)$",
|
||||
ClubAccountDetailView.as_view(),
|
||||
name="club_details",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^club/(?P<c_account_id>[0-9]+)/edit$",
|
||||
ClubAccountEditView.as_view(),
|
||||
name="club_edit",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^club/(?P<c_account_id>[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<j_id>[0-9]+)$",
|
||||
JournalDetailView.as_view(),
|
||||
name="journal_details",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^journal/(?P<j_id>[0-9]+)/edit$",
|
||||
JournalEditView.as_view(),
|
||||
name="journal_edit",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^journal/(?P<j_id>[0-9]+)/delete$",
|
||||
JournalDeleteView.as_view(),
|
||||
name="journal_delete",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^journal/(?P<j_id>[0-9]+)/statement/nature$",
|
||||
JournalNatureStatementView.as_view(),
|
||||
name="journal_nature_statement",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^journal/(?P<j_id>[0-9]+)/statement/person$",
|
||||
JournalPersonStatementView.as_view(),
|
||||
name="journal_person_statement",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^journal/(?P<j_id>[0-9]+)/statement/accounting$",
|
||||
JournalAccountingStatementView.as_view(),
|
||||
name="journal_accounting_statement",
|
||||
),
|
||||
# Operations
|
||||
url(
|
||||
re_path(
|
||||
r"^operation/create/(?P<j_id>[0-9]+)$",
|
||||
OperationCreateView.as_view(),
|
||||
name="op_new",
|
||||
),
|
||||
url(r"^operation/(?P<op_id>[0-9]+)$", OperationEditView.as_view(), name="op_edit"),
|
||||
url(
|
||||
re_path(
|
||||
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"
|
||||
),
|
||||
# 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<co_id>[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<co_id>[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<clubaccount_id>[0-9]+)$",
|
||||
LabelListView.as_view(),
|
||||
name="label_list",
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
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$",
|
||||
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"),
|
||||
]
|
||||
|
Reference in New Issue
Block a user