Compare commits

...

4 Commits

Author SHA1 Message Date
80bdb361be Merge pull request 'django_4' (#362) from django_4 into Docker_django_4
Reviewed-on: SGD-Nord/konova#362
2023-11-29 12:23:35 +01:00
b9c9310f21 Merge pull request 'Hotfix: EcoAccount serializable' (#361) from 360_EcoAccount_not_serializable into django_4
Reviewed-on: SGD-Nord/konova#361
2023-11-29 12:22:42 +01:00
a0823814c5 Hotfix: EcoAccount serializable
* fixes bug where EcoAccount model was not serializable due to changes in newer DAL version due to Django4
2023-11-29 12:21:37 +01:00
fb67e42078 # CSRF_TRUSTED_ORIGINS
* new in Django4: setting CSRF_TRUSTED_ORIGINS needs to be set to schema+host for new CSRF security handling
2023-11-28 12:59:40 +01:00
2 changed files with 10 additions and 0 deletions

View File

@ -32,3 +32,9 @@ class EcoAccountAutocomplete(Select2QuerySetView):
Q(title__icontains=self.q)
).distinct()
return qs
def get_result_label(self, result):
return str(result)
def get_selected_result_label(self, result):
return str(result)

View File

@ -42,6 +42,10 @@ ALLOWED_HOSTS = [
"localhost",
]
CSRF_TRUSTED_ORIGINS = [
"http://localhost", # not only host but schema (http/s) as well!
]
# Authentication settings
LOGIN_URL = "/login/"