ComptaClub/comptabilite/urls.py

63 lines
1.8 KiB
Python
Raw Normal View History

2022-01-07 12:29:22 +01:00
# from django.conf.urls import path
from django.urls import path, re_path
2020-02-17 21:38:47 +01:00
from .views import (
year_listing,
transaction_details,
comptability_export,
generate_pdf_for_spf,
export_year_spf_finance,
transaction_by_year_listing,
transaction_listing_for_year_and_type,
transaction_create_or_update
2020-02-17 21:38:47 +01:00
)
app_name = "annualcomptability"
urlpatterns = [
2022-01-07 12:29:22 +01:00
path(r"", year_listing, name="year_listing"),
re_path(
r"^listing/(?P<accounting_year>[0-9]{4})/(?P<transaction_kind>[A-Za-z]+)/$",
2020-02-17 21:38:47 +01:00
transaction_by_year_listing,
name="by_year_bank",
),
2022-01-07 12:29:22 +01:00
re_path(
r"^listing/(?P<accounting_year>[0-9]{4})/(?P<transaction_kind>[A-Za-z]+)/$",
2020-02-17 21:38:47 +01:00
transaction_by_year_listing,
name="by_year_box",
),
2022-04-25 10:19:54 +02:00
path(
r"listing/<int:accounting_year>/<int:transaction_type_id>/",
2020-02-17 21:38:47 +01:00
transaction_listing_for_year_and_type,
name="transaction_listing_for_year_and_type",
),
# http://127.0.0.1:8000/comptability/annual/listing/2017/3
2022-04-25 10:19:54 +02:00
path(
r"listing/<int:accounting_year>/",
2020-02-22 11:08:26 +01:00
transaction_by_year_listing,
name="by_year",
),
2022-01-07 12:29:22 +01:00
path(
r"details/<int:transaction_id>/",
2020-02-17 21:38:47 +01:00
transaction_details,
2022-04-25 10:19:54 +02:00
name="transaction_details",
2020-02-17 21:38:47 +01:00
),
2022-04-25 10:19:54 +02:00
path(
r"export/simple/<int:accounting_year>/",
2020-02-17 21:38:47 +01:00
export_year_spf_finance,
name="export_simple",
),
2022-01-07 12:29:22 +01:00
re_path(
r"^export/(?P<accounting_year>[0-9]{4})/(?P<export_type>\w+)/$",
2020-02-17 21:38:47 +01:00
comptability_export,
name="export",
),
2022-04-25 10:19:54 +02:00
path(
r"export/pdf/<int:accounting_year>/",
2020-02-22 11:08:26 +01:00
generate_pdf_for_spf,
name="pdf_export",
),
path(r"create/", transaction_create_or_update, name="transaction_create"),
path(r"update/<int:transaction_id>/", transaction_create_or_update, name="transaction_update"),
2020-02-17 21:38:47 +01:00
]