#49 Parcels on report

* adds parcel displaying on public reports
* fixes bug in EMA where autocomplete js would not load for modal forms
* fixes bug where BaseContext cached data from last request and reused it, if not overwritten
This commit is contained in:
2022-01-05 14:41:32 +01:00
parent 49859d17d2
commit a09fdae58c
10 changed files with 36 additions and 11 deletions

View File

@@ -15,18 +15,17 @@ class BaseContext:
"""
Holds all base data which is needed for every context rendering
"""
context = {
"base_title": BASE_TITLE,
"base_frontend_title": BASE_FRONTEND_TITLE,
"language": LANGUAGE_CODE,
"user": None,
"current_role": None,
"help_link": HELP_LINK,
}
context = None
def __init__(self, request: HttpRequest, additional_context: dict = {}):
self.context["language"] = request.LANGUAGE_CODE
self.context["user"] = request.user
self.context = {
"base_title": BASE_TITLE,
"base_frontend_title": BASE_FRONTEND_TITLE,
"language": request.LANGUAGE_CODE,
"user": request.user,
"current_role": None,
"help_link": HELP_LINK
}
# Add additional context, derived from given parameters
self.context.update(additional_context)