From 32e9b53a5a858f40d6dd066e6b8289c2217fbbff Mon Sep 17 00:00:00 2001 From: Lorenz Zahn <lorenz.zahn@student.uni-halle.de> Date: Sat, 29 Jul 2023 16:02:04 +0200 Subject: [PATCH] documentation --- .../accounting/announcements/__init__.py | 3 +++ .../accounting/announcements/urls.py | 4 ++++ .../workhours/accounting/costs/__init__.py | 3 +++ .../accounting/costs/departments/__init__.py | 3 +++ .../accounting/costs/departments/urls.py | 4 ++++ app/vkk/workhours/accounting/costs/forms.py | 24 +++++++++++++++++++ .../accounting/costs/general/__init__.py | 3 +++ .../accounting/costs/general/urls.py | 4 ++++ .../costs/receipt_template/__init__.py | 3 +++ .../accounting/costs/receipt_template/urls.py | 4 ++++ .../costs/salary_levels/__init__.py | 3 +++ .../accounting/costs/salary_levels/urls.py | 4 ++++ app/vkk/workhours/accounting/costs/urls.py | 4 ++++ 13 files changed, 66 insertions(+) diff --git a/app/vkk/workhours/accounting/announcements/__init__.py b/app/vkk/workhours/accounting/announcements/__init__.py index e69de29b..a2bcd7da 100644 --- a/app/vkk/workhours/accounting/announcements/__init__.py +++ b/app/vkk/workhours/accounting/announcements/__init__.py @@ -0,0 +1,3 @@ +""" +This module contains the utilities associated with the management of announcements on the website. +""" \ No newline at end of file diff --git a/app/vkk/workhours/accounting/announcements/urls.py b/app/vkk/workhours/accounting/announcements/urls.py index 5b9af175..73491ae4 100644 --- a/app/vkk/workhours/accounting/announcements/urls.py +++ b/app/vkk/workhours/accounting/announcements/urls.py @@ -1,3 +1,7 @@ +""" +This submodule contains the routing configuration. +""" + from django.urls import path from django.utils.translation import gettext_lazy as _ from ..views import * diff --git a/app/vkk/workhours/accounting/costs/__init__.py b/app/vkk/workhours/accounting/costs/__init__.py index e69de29b..d7ad4c06 100644 --- a/app/vkk/workhours/accounting/costs/__init__.py +++ b/app/vkk/workhours/accounting/costs/__init__.py @@ -0,0 +1,3 @@ +""" +This module contains the utilities associated with the management of several costs on the website. +""" \ No newline at end of file diff --git a/app/vkk/workhours/accounting/costs/departments/__init__.py b/app/vkk/workhours/accounting/costs/departments/__init__.py index e69de29b..7f421a2c 100644 --- a/app/vkk/workhours/accounting/costs/departments/__init__.py +++ b/app/vkk/workhours/accounting/costs/departments/__init__.py @@ -0,0 +1,3 @@ +""" +This module contains the utilities associated with the management of department costs on the website. +""" \ No newline at end of file diff --git a/app/vkk/workhours/accounting/costs/departments/urls.py b/app/vkk/workhours/accounting/costs/departments/urls.py index 0fdc34be..04a4093d 100644 --- a/app/vkk/workhours/accounting/costs/departments/urls.py +++ b/app/vkk/workhours/accounting/costs/departments/urls.py @@ -1,3 +1,7 @@ +""" +This submodule contains the routing configuration. +""" + from django.urls import path, include from django.utils.translation import gettext_lazy as _ from vkk.models import DepartmentDate diff --git a/app/vkk/workhours/accounting/costs/forms.py b/app/vkk/workhours/accounting/costs/forms.py index c1e11ba9..b4e33e11 100644 --- a/app/vkk/workhours/accounting/costs/forms.py +++ b/app/vkk/workhours/accounting/costs/forms.py @@ -1,3 +1,7 @@ +""" +A collection of forms used throughout the `costs` module. +""" + from django import forms from vkk.workhours.models import ( GeneralCosts, DepartmentDate, DepartmentCosts, @@ -7,6 +11,9 @@ from vkk.workhours.models import ( from vkk.workhours.forms import CustomDateInput class DepartmentCostForm(forms.ModelForm): + """ + A `ModelForm` subclass for entering `DepartmentCost`s associated to a `DepartmentDate` (model). + """ class Meta: model = DepartmentDate fields = ['date'] @@ -15,6 +22,9 @@ class DepartmentCostForm(forms.ModelForm): } def __init__(self, *args, **kwargs): + """ + Initializes and returns an instance of this class. + """ super().__init__(*args, **kwargs) # Collect all associated departments to create fields @@ -40,6 +50,10 @@ class DepartmentCostForm(forms.ModelForm): ].initial = department_cost_instance.equivalents_per_hour def save(self, commit=True): + """ + Attempts to save the associated data of this object to the database. + Returns the assocaiated `DepartmentDate` instance of this class. + """ # save instance super().save(commit) # save all associated instances @@ -65,6 +79,9 @@ class DepartmentCostForm(forms.ModelForm): return self.instance class SalaryLevelCostForm(forms.ModelForm): + """ + A `ModelForm` subclass for entering `SalaryLevelCosts`s associated to a `SalaryLevelDate` (model). + """ class Meta: model = SalaryLevelDate fields = ['date'] @@ -73,6 +90,9 @@ class SalaryLevelCostForm(forms.ModelForm): } def __init__(self, *args, **kwargs): + """ + Initializes and returns an instance of this class. + """ super().__init__(*args, **kwargs) # Collect all associated departments to create fields @@ -98,6 +118,10 @@ class SalaryLevelCostForm(forms.ModelForm): ].initial = salary_level_cost_instance.brutto_per_hour def save(self, commit=True): + """ + Attempts to save the associated data of this object to the database. + Returns the assocaiated `SalaryLevelDate` instance of this class. + """ # save instance super().save(commit) # save all associated instances diff --git a/app/vkk/workhours/accounting/costs/general/__init__.py b/app/vkk/workhours/accounting/costs/general/__init__.py index e69de29b..dbbcea19 100644 --- a/app/vkk/workhours/accounting/costs/general/__init__.py +++ b/app/vkk/workhours/accounting/costs/general/__init__.py @@ -0,0 +1,3 @@ +""" +This module contains the utilities associated with the management of general costs on the website. +""" \ No newline at end of file diff --git a/app/vkk/workhours/accounting/costs/general/urls.py b/app/vkk/workhours/accounting/costs/general/urls.py index 1a208a21..3d346fd3 100644 --- a/app/vkk/workhours/accounting/costs/general/urls.py +++ b/app/vkk/workhours/accounting/costs/general/urls.py @@ -1,3 +1,7 @@ +""" +This submodule contains the routing configuration. +""" + from django.urls import path, include from django.utils.translation import gettext_lazy as _ from django.forms import modelform_factory diff --git a/app/vkk/workhours/accounting/costs/receipt_template/__init__.py b/app/vkk/workhours/accounting/costs/receipt_template/__init__.py index e69de29b..6b6b3590 100644 --- a/app/vkk/workhours/accounting/costs/receipt_template/__init__.py +++ b/app/vkk/workhours/accounting/costs/receipt_template/__init__.py @@ -0,0 +1,3 @@ +""" +This module contains the utilities associated with the management of receipt templates on the website. +""" \ No newline at end of file diff --git a/app/vkk/workhours/accounting/costs/receipt_template/urls.py b/app/vkk/workhours/accounting/costs/receipt_template/urls.py index f89b7fd5..548fe8e9 100644 --- a/app/vkk/workhours/accounting/costs/receipt_template/urls.py +++ b/app/vkk/workhours/accounting/costs/receipt_template/urls.py @@ -1,3 +1,7 @@ +""" +This submodule contains the routing configuration. +""" + from django.urls import path, include from django.utils.translation import gettext_lazy as _ from django.forms import modelform_factory diff --git a/app/vkk/workhours/accounting/costs/salary_levels/__init__.py b/app/vkk/workhours/accounting/costs/salary_levels/__init__.py index e69de29b..9e869735 100644 --- a/app/vkk/workhours/accounting/costs/salary_levels/__init__.py +++ b/app/vkk/workhours/accounting/costs/salary_levels/__init__.py @@ -0,0 +1,3 @@ +""" +This module contains the utilities associated with the management of salary level costs on the website. +""" \ No newline at end of file diff --git a/app/vkk/workhours/accounting/costs/salary_levels/urls.py b/app/vkk/workhours/accounting/costs/salary_levels/urls.py index 4c70b95f..987a82e8 100644 --- a/app/vkk/workhours/accounting/costs/salary_levels/urls.py +++ b/app/vkk/workhours/accounting/costs/salary_levels/urls.py @@ -1,3 +1,7 @@ +""" +This submodule contains the routing configuration. +""" + from django.urls import path, include from django.utils.translation import gettext_lazy as _ from vkk.models import SalaryLevelDate diff --git a/app/vkk/workhours/accounting/costs/urls.py b/app/vkk/workhours/accounting/costs/urls.py index a2e9a070..fbd3de1d 100644 --- a/app/vkk/workhours/accounting/costs/urls.py +++ b/app/vkk/workhours/accounting/costs/urls.py @@ -1,3 +1,7 @@ +""" +This submodule contains the routing configuration. +""" + from django.urls import path, include from django.utils.translation import gettext_lazy as _ from ..views import AccountingOverView -- GitLab