Merge pull request 'django_4' (#362) from django_4 into Docker_django_4

Reviewed-on: SGD-Nord/konova#362
This commit is contained in:
mpeltriaux 2023-11-29 12:23:35 +01:00
commit 80bdb361be
2 changed files with 10 additions and 0 deletions

View File

@ -32,3 +32,9 @@ class EcoAccountAutocomplete(Select2QuerySetView):
Q(title__icontains=self.q) Q(title__icontains=self.q)
).distinct() ).distinct()
return qs 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", "localhost",
] ]
CSRF_TRUSTED_ORIGINS = [
"http://localhost", # not only host but schema (http/s) as well!
]
# Authentication settings # Authentication settings
LOGIN_URL = "/login/" LOGIN_URL = "/login/"