vkk.workhours.accounting.costs.receipt_template.urls
This submodule contains the routing configuration.
1""" 2This submodule contains the routing configuration. 3""" 4 5from django.urls import path, include 6from django.utils.translation import gettext_lazy as _ 7from django.forms import modelform_factory 8from vkk.generic.forms import CustomDateInput 9from vkk.models import ReceiptTemplate 10from vkk.workhours.accounting.views import ( 11 AccountingCreateView, AccountingUpdateView, 12 AccountingDeleteView, AccountingListView, 13 AccountingSuccessView, AccountingDetailView 14) 15 16model = {'model': ReceiptTemplate} 17form_class = modelform_factory( 18 model=ReceiptTemplate, 19 fields=['start', 'data'], 20 widgets={'start':CustomDateInput} 21) 22action_options = {'action_options' : {'details': _('Details'), 'update' : _('Update'), 'delete' : _('Delete')}} 23 24app_name = 'receipt_template' 25urlpatterns = [ 26 path( 27 _('<int:pk>/details/'), 28 AccountingDetailView.as_view( 29 **model, 30 fields=['start', 'data'] 31 ), 32 name='details' 33 ), 34 path( 35 _('create/'), 36 AccountingCreateView.as_view(**model, form_class=form_class), 37 name='create' 38 ), 39 path( 40 _('create/success/'), 41 AccountingSuccessView.as_view( 42 template_name='vkk/generic/create_success.html', 43 **model 44 ), 45 name='create_success' 46 ), 47 path( 48 _('<int:pk>/update/'), 49 AccountingUpdateView.as_view(**model, form_class=form_class), 50 name='update' 51 ), 52 path( 53 _('update/success/'), 54 AccountingSuccessView.as_view( 55 template_name='vkk/generic/update_success.html', 56 **model 57 ), 58 name='update_success' 59 ), 60 path( 61 _('<int:pk>/delete/'), 62 AccountingDeleteView.as_view(**model), 63 name='delete' 64 ), 65 path( 66 _('delete/success/'), 67 AccountingSuccessView.as_view( 68 template_name='vkk/generic/delete_success.html', 69 **model 70 ), 71 name='delete_success' 72 ), 73 path( 74 '', 75 AccountingListView.as_view( 76 **model, 77 fields=['start'], 78 ordering=['start'], 79 **action_options, 80 ), 81 name='default' 82 ), 83]
model =
{'model': <class 'vkk.workhours.models.ReceiptTemplate'>}
form_class =
<class 'django.forms.widgets.ReceiptTemplateForm'>
action_options =
{'action_options': {'details': 'Details', 'update': 'Ändern', 'delete': 'Löschen'}}
app_name =
'receipt_template'
urlpatterns =
[<URLPattern '<int:pk>/details/' [name='details']>, <URLPattern 'erstellen/' [name='create']>, <URLPattern 'erstellen/erfolg/' [name='create_success']>, <URLPattern '<int:pk>/aktualisieren/' [name='update']>, <URLPattern 'aktualisieren/erfolg/' [name='update_success']>, <URLPattern '<int:pk>/loeschen/' [name='delete']>, <URLPattern 'loeschen/erfolg/' [name='delete_success']>, <URLPattern '' [name='default']>]