Codelist integration

* adds codelist app
* adds KonovaCodeList and KonovaCode model for fetching and storing OSIRIS Codelisten entries
* adds update_codelist command for updating and fetching codes
* adds autocomplete route for using codelists in forms
This commit is contained in:
mipel
2021-08-23 18:30:02 +02:00
parent c94d73c037
commit 49f7f3db53
12 changed files with 344 additions and 2 deletions
+4 -2
View File
@@ -18,7 +18,7 @@ from django.contrib import admin
from django.urls import path, include
from konova.autocompletes import OrganisationAutocomplete, NonOfficialOrganisationAutocomplete, EcoAccountAutocomplete, \
InterventionAutocomplete
InterventionAutocomplete, KonovaCodeAutocomplete
from konova.settings import SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY, DEBUG
from konova.sso.sso import KonovaSSOClient
from konova.views import logout_view, home_view, get_document_view, remove_document_view, remove_deadline_view
@@ -35,6 +35,7 @@ urlpatterns = [
path('organisation/', include("organisation.urls")),
path('user/', include("user.urls")),
path('news/', include("news.urls")),
path('news/', include("codelist.urls")),
# Generic documents routes
path('document/<id>', get_document_view, name="doc-open"),
@@ -43,11 +44,12 @@ urlpatterns = [
# Generic deadline routes
path('deadline/<id>/remove', remove_deadline_view, name="deadline-remove"),
# Autocomplete paths
# Autocomplete paths for all apps
path("atcmplt/orgs", OrganisationAutocomplete.as_view(), name="orgs-autocomplete"),
path("atcmplt/orgs/other", NonOfficialOrganisationAutocomplete.as_view(), name="other-orgs-autocomplete"),
path("atcmplt/eco-accounts", EcoAccountAutocomplete.as_view(), name="accounts-autocomplete"),
path("atcmplt/interventions", InterventionAutocomplete.as_view(), name="interventions-autocomplete"),
path("atcmplt/codes", KonovaCodeAutocomplete.as_view(), name="codes-autocomplete"),
]
if DEBUG: