Skip to content

Commit

Permalink
Use "webpack" instead of "manifest" for the more precise term (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
jace authored May 28, 2024
1 parent 38658e7 commit bf79bde
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion boxoffice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

mail = Mail()
rq = RQ()
manifest = WebpackManifest(app, filepath='static/build/manifest.json')
webpack = WebpackManifest(
app, filepath='static/build/manifest.json', jinja_global='webpack'
)

# --- Assets ---------------------------------------------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions boxoffice/templates/index.html.jinja2
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% extends "layout.html.jinja2" %}

{%- block layoutheaders %}
<link rel="stylesheet" type="text/css" href="{{ manifest('css/app.scss') }}"/>
<link rel="stylesheet" type="text/css" href="{{ manifest('css/admin.scss') }}"/>
<link rel="stylesheet" type="text/css" href="{{ webpack('css/app.scss') }}"/>
<link rel="stylesheet" type="text/css" href="{{ webpack('css/admin.scss') }}"/>
{% endblock layoutheaders %}

{% block title %}{% if title %} {{ title }}{% else %}{% trans %}Admin{% endtrans %}{% endif %}{% endblock title %}
Expand All @@ -21,5 +21,5 @@
window.boxofficeAdmin.siteTitle = "{% trans %}Boxoffice{% endtrans %}";
window.boxofficeFirstLoad = true;
</script>
<script type="text/javascript" src="{{ manifest('main_admin.js') }}"></script>
<script type="text/javascript" src="{{ webpack('main_admin.js') }}"></script>
{% endblock footerscripts %}
2 changes: 1 addition & 1 deletion boxoffice/templates/invoice_form.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
{% endblock content %}

{% block footerscripts %}
<script type="text/javascript" src="{{ manifest('main_invoice.js') }}"></script>
<script type="text/javascript" src="{{ webpack('main_invoice.js') }}"></script>
{% endblock footerscripts %}
2 changes: 1 addition & 1 deletion boxoffice/templates/layout.html.jinja2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "baseframe.html.jinja2" -%}

{%- block layoutheaders %}
<link rel="stylesheet" type="text/css" href="{{ manifest('css/app.scss') }}"/>
<link rel="stylesheet" type="text/css" href="{{ webpack('css/app.scss') }}"/>
{% endblock layoutheaders %}

{% block headerbox %}
Expand Down
2 changes: 1 addition & 1 deletion boxoffice/templates/order.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
</div>
{% endblock content %}
{% block footerscripts %}
<script type="text/javascript" src="{{ manifest('main_order.js') }}"></script>
<script type="text/javascript" src="{{ webpack('main_order.js') }}"></script>
{% endblock footerscripts %}

0 comments on commit bf79bde

Please sign in to comment.