Autocomplete refactoring

* refactors konova/autocompletes.py by splitting into individual files and moving them to fitting apps
     * autocomplete files now live in APPNAME/autocomplete/...
This commit is contained in:
2022-08-18 11:25:06 +02:00
parent 4b3a35c30e
commit d785285805
33 changed files with 596 additions and 465 deletions

View File

@@ -33,7 +33,7 @@ class NewEcoAccountDeductionModalForm(BaseModalForm):
help_text=_("Only recorded accounts can be selected for deductions"),
queryset=EcoAccount.objects.filter(deleted=None),
widget=autocomplete.ModelSelect2(
url="accounts-autocomplete",
url="compensation:acc:autocomplete",
attrs={
"data-placeholder": _("Eco-account"),
"data-minimum-input-length": 3,
@@ -60,7 +60,7 @@ class NewEcoAccountDeductionModalForm(BaseModalForm):
help_text=_("Only shared interventions can be selected"),
queryset=Intervention.objects.filter(deleted=None),
widget=autocomplete.ModelSelect2(
url="interventions-autocomplete",
url="intervention:autocomplete",
attrs={
"data-placeholder": _("Intervention"),
"data-minimum-input-length": 3,