vkk.workhours.accounting.projects.project.export.receipts.urls

This submodule contains the routing configuration.

 1"""
 2This submodule contains the routing configuration.
 3"""
 4
 5from django.urls import include, path
 6from django.utils.translation import gettext_lazy as _
 7from vkk.models import Receipt
 8from vkk.workhours.accounting.views import (
 9    AccountingSuccessView, AccountingDetailView, AccountingDeleteView,
10)
11from .views import ReceiptListView, ReceiptCreateView, ReceiptTemplateSelectionView
12
13model = {'model': Receipt}
14fields = {
15    'fields' : ['start', 'end', 'create_time', 'data']
16}
17
18app_name='receipts'
19urlpatterns = [
20    path(
21        _('create/'),
22        ReceiptCreateView.as_view(),
23        name='create'
24    ),
25    path(
26        _('create/success/'),
27        AccountingSuccessView.as_view(
28            template_name='vkk/generic/create_success.html',
29            **model
30        ),
31        name='create_success'
32    ),
33    path(
34        _('<int:pk>/details/'),
35        AccountingDetailView.as_view(
36            **model,
37            **fields
38        ),
39        name='details'
40    ),
41    path(
42        _('<int:pk>/delete/'),
43        AccountingDeleteView.as_view(**model),
44        name='delete'
45    ),
46    path(
47        _('delete/success/'),
48        AccountingSuccessView.as_view(
49            template_name='vkk/generic/delete_success.html',
50            **model
51        ),
52        name='delete_success'
53    ),
54    path(
55        _('<int:pk>/receipt_download/'),
56        ReceiptTemplateSelectionView.as_view(),
57        name='receipt_download'
58    ),
59    path('', ReceiptListView.as_view(), name='default'),
60]
model = {'model': <class 'vkk.workhours.models.Receipt'>}
fields = {'fields': ['start', 'end', 'create_time', 'data']}
app_name = 'receipts'
urlpatterns = [<URLPattern 'erstellen/' [name='create']>, <URLPattern 'erstellen/erfolg/' [name='create_success']>, <URLPattern '<int:pk>/details/' [name='details']>, <URLPattern '<int:pk>/loeschen/' [name='delete']>, <URLPattern 'loeschen/erfolg/' [name='delete_success']>, <URLPattern '<int:pk>/beleg_herunnterladen/' [name='receipt_download']>, <URLPattern '' [name='default']>]