Skip to content

Commit

Permalink
use webpack_manifest to lookup webpack asset for main_script js file …
Browse files Browse the repository at this point in the history
…in cntxt, re #11670
  • Loading branch information
whatisgalen committed Jan 12, 2025
1 parent 260737c commit c5e6310
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arches/app/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
get_resource_types_by_perm,
user_can_read_map_layers,
)
from arches.app.utils.context_processors import webpack_manifest


class BaseManagerView(TemplateView):
Expand Down Expand Up @@ -93,6 +94,12 @@ def get_context_data(self, **kwargs):
)
> 0
)
context["webpack_manifest"] = webpack_manifest(self.request)
main_script = kwargs.get("main_script", None)
if main_script:
context["main_script_webpack_asset"] = context["webpack_manifest"].get(
f"{main_script}.js", ""
)
context["app_name"] = settings.APP_NAME
context["show_language_swtich"] = settings.SHOW_LANGUAGE_SWITCH
return context
Expand Down

0 comments on commit c5e6310

Please sign in to comment.