{% inventree_title %}
{% block content %} - {% endblock %} + {% endblock content %}
From 10c3d101e822b30cf0cdf98ae1fa396d5833d246 Mon Sep 17 00:00:00 2001
From: Matthias Mair {{ build.title }}
Date: Tue, 2 May 2023 12:03:52 +0200
Subject: [PATCH] Replace mklint with djlint (#4746)
* remove markuplint
* remove dedicated html step - will be done by pre-commit
* add djlint for django template linting
* Fix T003: Endblock should have name
* Fix H013: Img tag should have an alt attribute
* Fix H014: Found extra blank lines
* Fix T003: Endblock should have name
* Fix H013: Img tag should have an alt attribute
* small fixes
* Fix T001: Variables should be wrapped in a single whitespace
* Fix T003: Endblock should have name
* small fixes
* fix form method
* add entry to contributing
* fix template changes
* another fix
* use current version
---
.djlintrc | 3 +
.github/workflows/qc_checks.yaml | 22 +-
.markuplintrc | 9 -
.pre-commit-config.yaml | 4 +
CONTRIBUTING.md | 18 +
.../build/templates/build/build_base.html | 15 +-
InvenTree/build/templates/build/detail.html | 21 +-
InvenTree/build/templates/build/index.html | 10 +-
.../templates/company/company_base.html | 22 +-
.../company/templates/company/detail.html | 6 +-
.../company/templates/company/index.html | 10 +-
.../templates/company/manufacturer_part.html | 19 +-
.../templates/company/supplier_part.html | 28 +-
.../label/templates/label/label_base.html | 6 +-
.../templates/label/part/part_label.html | 9 +-
.../label/part/part_label_code128.html | 9 +-
.../label/templates/label/stockitem/qr.html | 9 +-
.../templates/label/stocklocation/qr.html | 9 +-
.../label/stocklocation/qr_and_text.html | 9 +-
.../order/templates/order/order_base.html | 8 +-
.../order/order_wizard/match_fields.html | 2 +-
.../order/order_wizard/match_parts.html | 4 +-
.../order/order_wizard/po_upload.html | 6 +-
.../order/purchase_order_detail.html | 3 +-
.../templates/order/purchase_orders.html | 12 +-
.../templates/order/return_order_base.html | 10 +-
.../templates/order/return_order_detail.html | 2 +-
.../order/templates/order/return_orders.html | 7 +-
.../templates/order/sales_order_base.html | 22 +-
.../templates/order/sales_order_detail.html | 9 +-
.../order/templates/order/sales_orders.html | 12 +-
InvenTree/part/templates/part/category.html | 13 +-
InvenTree/part/templates/part/copy_part.html | 2 +-
.../part/templates/part/create_part.html | 2 +-
InvenTree/part/templates/part/detail.html | 11 +-
.../part/import_wizard/ajax_match_fields.html | 2 +-
.../import_wizard/ajax_match_references.html | 2 +-
.../part/import_wizard/ajax_part_upload.html | 2 +-
.../part/import_wizard/match_fields.html | 2 +-
.../part/import_wizard/match_references.html | 2 +-
.../part/import_wizard/part_upload.html | 6 +-
.../part/templates/part/part_app_base.html | 2 +-
InvenTree/part/templates/part/part_base.html | 23 +-
.../part/templates/part/part_pricing.html | 4 +-
InvenTree/part/templates/part/part_thumb.html | 2 +-
InvenTree/part/templates/part/prices.html | 1 -
.../templates/part/pricing_javascript.html | 4 +-
.../part/templates/part/select_image.html | 5 +-
InvenTree/part/templates/part/upload_bom.html | 6 +-
.../part/templates/part/variant_part.html | 2 +-
.../inventree_bill_of_materials_report.html | 18 +-
.../report/inventree_build_order_base.html | 14 +-
.../report/inventree_order_report_base.html | 11 +-
.../report/inventree_po_report_base.html | 7 +-
.../report/inventree_report_base.html | 6 +-
.../inventree_return_order_report_base.html | 2 +-
.../report/inventree_so_report_base.html | 7 +-
.../report/inventree_test_report_base.html | 18 +-
InvenTree/stock/templates/stock/item.html | 6 +-
.../stock/templates/stock/item_base.html | 14 +-
.../stock/templates/stock/item_serialize.html | 2 +-
InvenTree/stock/templates/stock/location.html | 13 +-
.../stock/templates/stock/stock_app_base.html | 4 +-
InvenTree/templates/403.html | 4 +-
InvenTree/templates/403_csrf.html | 4 +-
InvenTree/templates/404.html | 4 +-
InvenTree/templates/500.html | 4 +-
InvenTree/templates/503.html | 19 +-
InvenTree/templates/InvenTree/index.html | 11 +-
.../InvenTree/notifications/history.html | 8 +-
.../InvenTree/notifications/inbox.html | 8 +-
.../notifications/notifications.html | 12 +-
InvenTree/templates/InvenTree/password.html | 2 +-
InvenTree/templates/InvenTree/search.html | 8 +-
.../templates/InvenTree/settings/barcode.html | 6 +-
.../templates/InvenTree/settings/build.html | 6 +-
.../InvenTree/settings/category.html | 8 +-
.../templates/InvenTree/settings/global.html | 7 +-
.../templates/InvenTree/settings/label.html | 6 +-
.../templates/InvenTree/settings/login.html | 7 +-
.../InvenTree/settings/mixins/urls.html | 6 +-
.../InvenTree/settings/notifications.html | 2 +-
.../templates/InvenTree/settings/part.html | 8 +-
.../InvenTree/settings/part_stocktake.html | 4 +-
.../templates/InvenTree/settings/plugin.html | 8 +-
.../InvenTree/settings/plugin_details.html | 4 +-
.../InvenTree/settings/plugin_settings.html | 15 +-
.../templates/InvenTree/settings/po.html | 6 +-
.../templates/InvenTree/settings/pricing.html | 4 +-
.../InvenTree/settings/project_codes.html | 2 -
.../templates/InvenTree/settings/report.html | 6 +-
.../templates/InvenTree/settings/returns.html | 6 +-
.../templates/InvenTree/settings/setting.html | 2 +-
.../InvenTree/settings/setting_boolean.html | 2 +-
.../InvenTree/settings/settings.html | 12 +-
.../InvenTree/settings/settings_staff_js.html | 3 -
.../templates/InvenTree/settings/so.html | 6 +-
.../templates/InvenTree/settings/stock.html | 6 +-
.../templates/InvenTree/settings/user.html | 18 +-
.../InvenTree/settings/user_display.html | 10 +-
.../InvenTree/settings/user_homepage.html | 6 +-
.../InvenTree/settings/user_labels.html | 6 +-
.../InvenTree/settings/user_reporting.html | 6 +-
.../InvenTree/settings/user_search.html | 7 +-
.../InvenTree/settings/user_settings.html | 6 +-
InvenTree/templates/account/base.html | 12 +-
.../templates/account/email_confirm.html | 5 +-
InvenTree/templates/account/login.html | 8 +-
InvenTree/templates/account/logout.html | 4 +-
.../templates/account/password_reset.html | 6 +-
.../account/password_reset_from_key.html | 6 +-
InvenTree/templates/account/signup.html | 4 +-
.../templates/account/signup_closed.html | 4 +-
.../templates/allauth_2fa/authenticate.html | 2 +-
.../templates/allauth_2fa/backup_tokens.html | 2 +-
InvenTree/templates/allauth_2fa/remove.html | 2 +-
InvenTree/templates/allauth_2fa/setup.html | 4 +-
InvenTree/templates/barcode_data.html | 2 +-
InvenTree/templates/base.html | 24 +-
InvenTree/templates/email/email.html | 18 +-
.../email/low_stock_notification.html | 1 -
InvenTree/templates/hover_image.html | 4 +-
InvenTree/templates/mail.html | 2 +-
InvenTree/templates/modal_form.html | 8 +-
InvenTree/templates/modals.html | 2 +-
InvenTree/templates/navbar.html | 6 +-
InvenTree/templates/page_base.html | 10 +-
InvenTree/templates/panel.html | 12 +-
.../patterns/wizard/match_fields.html | 2 +-
InvenTree/templates/qr_code.html | 2 +-
.../templates/registration/logged_out.html | 2 +-
InvenTree/templates/sample/sample.html | 2 +-
InvenTree/templates/skeleton.html | 22 +-
.../socialaccount/authentication_error.html | 4 +-
InvenTree/templates/socialaccount/login.html | 4 +-
InvenTree/templates/socialaccount/signup.html | 4 +-
.../socialaccount/snippets/provider_list.html | 12 +-
InvenTree/templates/tel.html | 2 +-
docs/_includes/img.html | 2 +-
docs/_includes/overrides/404.html | 6 +-
docs/_includes/overrides/home.html | 4 +-
docs/_includes/overrides/main.html | 2 +-
docs/_includes/splide_image.html | 4 +-
package-lock.json | 2039 +----------------
package.json | 3 +-
145 files changed, 510 insertions(+), 2589 deletions(-)
create mode 100644 .djlintrc
delete mode 100644 .markuplintrc
diff --git a/.djlintrc b/.djlintrc
new file mode 100644
index 0000000000..58e7fe1c0d
--- /dev/null
+++ b/.djlintrc
@@ -0,0 +1,3 @@
+{
+ "ignore": "D018,H006,H008,H020,H021,H023,H025,H030,H031,T002"
+}
diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml
index 6084c28e55..ff8a7cc695 100644
--- a/.github/workflows/qc_checks.yaml
+++ b/.github/workflows/qc_checks.yaml
@@ -76,22 +76,6 @@ jobs:
python InvenTree/manage.py prerender
npx eslint InvenTree/InvenTree/static_i18n/i18n/*.js
- html:
- name: Style [HTML]
- runs-on: ubuntu-20.04
-
- needs: pep_style
-
- steps:
- - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3.1.0
- - name: Enviroment Setup
- uses: ./.github/actions/setup
- with:
- npm: true
- install: true
- - name: Check HTML Files
- run: npx markuplint **/templates/*.html
-
pre-commit:
name: Style [pre-commit]
runs-on: ubuntu-20.04
@@ -194,7 +178,7 @@ jobs:
name: Tests - DB [SQLite] + Coverage
runs-on: ubuntu-20.04
- needs: [ 'javascript', 'html', 'pre-commit' ]
+ needs: [ 'javascript', 'pre-commit' ]
continue-on-error: true # continue if a step fails so that coverage gets pushed
env:
@@ -227,7 +211,7 @@ jobs:
postgres:
name: Tests - DB [PostgreSQL]
runs-on: ubuntu-20.04
- needs: [ 'javascript', 'html', 'pre-commit' ]
+ needs: [ 'javascript', 'pre-commit' ]
env:
INVENTREE_DB_ENGINE: django.db.backends.postgresql
@@ -271,7 +255,7 @@ jobs:
name: Tests - DB [MySQL]
runs-on: ubuntu-20.04
- needs: [ 'javascript', 'html', 'pre-commit' ]
+ needs: [ 'javascript', 'pre-commit' ]
if: github.event_name == 'push'
env:
diff --git a/.markuplintrc b/.markuplintrc
deleted file mode 100644
index 858d05f3b2..0000000000
--- a/.markuplintrc
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "overrides": {
- "**/templates/*.html": {
- "rules": {
- "[[character-reference]]": false
- }
- }
- }
-}
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 9ed3e281f1..d8e11a1211 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -40,3 +40,7 @@ repos:
name: pip-compile requirements.txt
args: [requirements.in, -o, requirements.txt]
files: ^requirements\.(in|txt)$
+- repo: https://github.com/Riverside-Healthcare/djLint
+ rev: v1.25.0
+ hooks:
+ - id: djlint-django
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1d417fdb62..0702815af2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -128,6 +128,24 @@ The various github actions can be found in the `./github/workflows` directory
Sumbitted Python code is automatically checked against PEP style guidelines. Locally you can run `invoke style` to ensure the style checks will pass, before submitting the PR.
Please write docstrings for each function and class - we follow the [google doc-style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) for python. Docstrings for general javascript code is encouraged! Docstyles are checked by `invoke style`.
+### Django templates
+
+Django are checked by [djlint](https://github.com/Riverside-Healthcare/djlint) through pre-commit.
+
+The following rules out of the [default set](https://djlint.com/docs/linter/) are not applied:
+```bash
+D018: (Django) Internal links should use the {% url ... %} pattern
+H006: Img tag should have height and width attributes
+H008: Attributes should be double quoted
+H021: Inline styles should be avoided
+H023: Do not use entity references
+H025: Tag seems to be an orphan
+H030: Consider adding a meta description
+H031: Consider adding meta keywords
+T002: Double quotes should be used in tags
+```
+
+
## Documentation
New features or updates to existing features should be accompanied by user documentation.
diff --git a/InvenTree/build/templates/build/build_base.html b/InvenTree/build/templates/build/build_base.html
index f0aff38766..fecc6638f6 100644
--- a/InvenTree/build/templates/build/build_base.html
+++ b/InvenTree/build/templates/build/build_base.html
@@ -7,7 +7,7 @@
{% block page_title %}
{% inventree_title %} | {% trans "Build Order" %} - {{ build }}
-{% endblock %}
+{% endblock page_title %}
{% block breadcrumbs %}
@@ -219,7 +219,7 @@ src="{% static 'img/blank_image.png' %}"
{% endif %}
-{% endblock %}
+{% endblock details_right %}
{% block page_data %}
@@ -231,8 +231,7 @@ src="{% static 'img/blank_image.png' %}"
{% trans "Description" %}
- {{ build.title }}{% include "clip.html"%}
+ {{ build.title }}{% include "clip.html" %}
{% trans "Part" %}
- {{ build.part.full_name }}{% include "clip.html"%}
+ {{ build.part.full_name }}{% include "clip.html" %}
@@ -38,7 +38,7 @@
{% trans "Stock Source" %}
{% if build.take_from %}
- {{ build.take_from }}{% include "clip.html"%}
+ {{ build.take_from }}{% include "clip.html" %}
{% else %}
{% trans "Stock can be taken from any available location." %}
{% endif %}
@@ -51,7 +51,7 @@
{% if build.destination %}
{{ build.destination }}
- {% include "clip.html"%}
+ {% include "clip.html" %}
{% else %}
{% trans "Destination location not specified" %}
{% endif %}
@@ -78,14 +78,14 @@
{% endif %}
{% if build.parent %}
{% trans "Batch" %}
- {{ build.batch }}{% include "clip.html"%}
+ {{ build.batch }}{% include "clip.html" %}
{% endif %}
{% if build.priority != 0 %}
@@ -99,7 +99,7 @@
{% trans "Parent Build" %}
- {{ build.parent }}{% include "clip.html"%}
+ {{ build.parent }}{% include "clip.html" %}
{% endif %}
{% if build.link %}
@@ -319,8 +319,7 @@
-
-{% endblock %}
+{% endblock page_content %}
{% block js_ready %}
{{ block.super }}
@@ -519,4 +518,4 @@ $('#allocate-selected-items').click(function() {
enableSidebar('buildorder');
-{% endblock %}
+{% endblock js_ready %}
diff --git a/InvenTree/build/templates/build/index.html b/InvenTree/build/templates/build/index.html
index 6f08348f44..5094c6a45a 100644
--- a/InvenTree/build/templates/build/index.html
+++ b/InvenTree/build/templates/build/index.html
@@ -6,11 +6,11 @@
{% block page_title %}
{% inventree_title %} | {% trans "Build Orders" %}
-{% endblock %}
+{% endblock page_title %}
{% block heading %}
{% trans "Build Orders" %}
-{% endblock %}
+{% endblock heading %}
{% block actions %}
{% if roles.build.add %}
@@ -18,7 +18,7 @@
{% trans "New Build Order" %}
{% endif %}
-{% endblock %}
+{% endblock actions %}
{% block page_info %}
@@ -35,7 +35,7 @@
-{% endblock %}
+{% endblock page_info %}
{% block js_ready %}
{{ block.super }}
@@ -48,4 +48,4 @@ loadBuildTable($("#build-table"), {
locale: '{{ request.LANGUAGE_CODE }}',
});
-{% endblock %}
+{% endblock js_ready %}
diff --git a/InvenTree/company/templates/company/company_base.html b/InvenTree/company/templates/company/company_base.html
index 2bf017b506..7953635671 100644
--- a/InvenTree/company/templates/company/company_base.html
+++ b/InvenTree/company/templates/company/company_base.html
@@ -6,11 +6,11 @@
{% block page_title %}
{% inventree_title %} | {% trans "Company" %} - {{ company.name }}
-{% endblock %}
+{% endblock page_title %}
{% block heading %}
{% trans "Company" %}: {{ company.name }}
-{% endblock %}
+{% endblock heading %}
{% block actions %}
@@ -45,7 +45,7 @@
{% block thumbnail %}
{% trans "Sales Order" %}
- {{ build.sales_order }}{% include "clip.html"%}
+ {{ build.sales_order }}{% include "clip.html" %}
@@ -74,7 +74,7 @@
-{% endblock %}
+{% endblock details %}
{% block details_right %}
@@ -99,7 +99,7 @@
- {%trans "Manufacturer" %}
+ {% trans "Manufacturer" %}
{% include "yesnolabel.html" with value=company.is_manufacturer %}
@@ -89,7 +89,7 @@
{% endif %}
{% trans "Website" %}
- {{ company.website }}{% include "clip.html"%}
+ {{ company.website }}{% include "clip.html" %}
@@ -117,7 +117,7 @@
{% endif %}
{% if company.phone %}
@@ -138,11 +138,11 @@
{% trans "Address" %}
- {{ company.address }}{% include "clip.html"%}
+ {{ company.address }}{% include "clip.html" %}
{% endif %}
-{% endblock %}
+{% endblock details_right %}
{% block js_ready %}
{{ block.super }}
@@ -262,4 +262,4 @@
});
}
-{% endblock %}
+{% endblock js_ready %}
diff --git a/InvenTree/company/templates/company/detail.html b/InvenTree/company/templates/company/detail.html
index 0f3bc6e203..513aaff775 100644
--- a/InvenTree/company/templates/company/detail.html
+++ b/InvenTree/company/templates/company/detail.html
@@ -5,7 +5,7 @@
{% block sidebar %}
{% include 'company/sidebar.html' %}
-{% endblock %}
+{% endblock sidebar %}
{% block page_content %}
@@ -270,7 +270,7 @@
-{% endblock %}
+{% endblock page_content %}
{% block js_ready %}
{{ block.super }}
@@ -542,4 +542,4 @@
enableSidebar('company');
-{% endblock %}
+{% endblock js_ready %}
diff --git a/InvenTree/company/templates/company/index.html b/InvenTree/company/templates/company/index.html
index f9790a9a1d..b255137114 100644
--- a/InvenTree/company/templates/company/index.html
+++ b/InvenTree/company/templates/company/index.html
@@ -6,11 +6,11 @@
{% block page_title %}
{% inventree_title %} | {% trans "Supplier List" %}
-{% endblock %}
+{% endblock page_title %}
{% block heading %}
{{ title }}
-{% endblock %}
+{% endblock heading %}
{% block actions %}
{% if pagetype == 'manufacturers' and roles.purchase_order.add or pagetype == 'suppliers' and roles.purchase_order.add or pagetype == 'customers' and roles.sales_order.add %}
@@ -18,7 +18,7 @@
{{ button_text }}
{% endif %}
-{% endblock %}
+{% endblock actions %}
{% block page_info %}
@@ -32,7 +32,7 @@
-{% endblock %}
+{% endblock page_info %}
{% block js_ready %}
{{ block.super }}
@@ -59,4 +59,4 @@
}
);
-{% endblock %}
+{% endblock js_ready %}
diff --git a/InvenTree/company/templates/company/manufacturer_part.html b/InvenTree/company/templates/company/manufacturer_part.html
index 50663c620f..c26e828558 100644
--- a/InvenTree/company/templates/company/manufacturer_part.html
+++ b/InvenTree/company/templates/company/manufacturer_part.html
@@ -5,7 +5,7 @@
{% block page_title %}
{% inventree_title %} | {% trans "Manufacturer Part" %}
-{% endblock %}
+{% endblock page_title %}
{% block sidebar %}
{% include "company/manufacturer_part_sidebar.html" %}
@@ -48,7 +48,7 @@
{% endblock actions %}
{% block thumbnail %}
-{% trans "Internal Part" %}
{% trans "Contact" %}
- {{ company.contact }}{% include "clip.html"%}
+ {{ company.contact }}{% include "clip.html" %}
{% if part.part %}
- {{ part.part.full_name }}{% include "clip.html"%}
+ {{ part.part.full_name }}{% include "clip.html" %}
{% endif %}
@@ -73,7 +73,7 @@ src="{% static 'img/blank_image.png' %}"
{% endif %}
@@ -90,7 +90,7 @@ src="{% static 'img/blank_image.png' %}"
{% trans "Description" %}
- {{ part.description }}{% include "clip.html"%}
+ {{ part.description }}{% include "clip.html" %}
{% trans "Manufacturer" %}
{% if part.manufacturer %}
- {{ part.manufacturer.name }}{% include "clip.html"%}
+ {{ part.manufacturer.name }}{% include "clip.html" %}
{% else %}
{% trans "No manufacturer information available" %}
{% endif %}
@@ -99,7 +99,7 @@ src="{% static 'img/blank_image.png' %}"
{% if part.link %}
{% trans "MPN" %}
- {{ part.MPN }}{% include "clip.html"%}
+ {{ part.MPN }}{% include "clip.html" %}
@@ -191,8 +191,7 @@ src="{% static 'img/blank_image.png' %}"
-{% endblock %}
-
+{% endblock page_content %}
{% block js_ready %}
{{ block.super }}
@@ -325,7 +324,7 @@ $('#delete-part').click(function() {
success: function() {
{% if part.manufacturer %}
window.location.href = "{% url 'company-detail' part.manufacturer.id %}";
- {% else%}
+ {% else %}
window.location.href = "{% url 'index' %}";
{% endif %}
}
@@ -338,4 +337,4 @@ $('#delete-part').click(function() {
enableSidebar('manufacturerpart');
-{% endblock %}
+{% endblock js_ready %}
diff --git a/InvenTree/company/templates/company/supplier_part.html b/InvenTree/company/templates/company/supplier_part.html
index 90f85faed8..87fc1f0f10 100644
--- a/InvenTree/company/templates/company/supplier_part.html
+++ b/InvenTree/company/templates/company/supplier_part.html
@@ -81,13 +81,13 @@
{% endblock actions %}
{% block thumbnail %}
-
-{% endblock %}
+{% endblock thumbnail %}
{% block details %}
@@ -98,7 +98,7 @@ src="{% static 'img/blank_image.png' %}"
@@ -106,7 +106,7 @@ src="{% static 'img/blank_image.png' %}"
{% trans "Internal Part" %}
{% if part.part %}
- {{ part.part.full_name }}{% include "clip.html"%}
+ {{ part.part.full_name }}{% include "clip.html" %}
{% endif %}
{% endif %}
{% if part.availability_updated %}
@@ -129,7 +129,7 @@ src="{% static 'img/blank_image.png' %}"
{% trans "Description" %}
- {{ part.description }}{% include "clip.html"%}
+ {{ part.description }}{% include "clip.html" %}
{% trans "Supplier" %}
{% if part.supplier %}
- {{ part.supplier.name }}{% include "clip.html"%}
+ {{ part.supplier.name }}{% include "clip.html" %}
{% else %}
{% trans "No supplier information available" %}
{% endif %}
@@ -138,28 +138,28 @@ src="{% static 'img/blank_image.png' %}"
+
{% trans "SKU" %}
- {{ part.SKU }}{% include "clip.html"%} {{ part.SKU }}{% include "clip.html" %}
{% if part.manufacturer_part.manufacturer %}
{% endif %}
{% if part.manufacturer_part.MPN %}
{% trans "Manufacturer" %}
- {{ part.manufacturer_part.manufacturer.name }}{% include "clip.html"%}
+ {{ part.manufacturer_part.manufacturer.name }}{% include "clip.html" %}
{% endif %}
{% if part.packaging %}
{% trans "MPN" %}
- {{ part.manufacturer_part.MPN }}{% include "clip.html"%}
+ {{ part.manufacturer_part.MPN }}{% include "clip.html" %}
{% endif %}
{% if part.pack_size != 1.0 %}
@@ -173,7 +173,7 @@ src="{% static 'img/blank_image.png' %}"
{% trans "Packaging" %}
- {{ part.packaging }}{% include "clip.html"%}
+ {{ part.packaging }}{% include "clip.html" %}
{% endif %}
{% if part.link %}
@@ -184,7 +184,7 @@ src="{% static 'img/blank_image.png' %}"
{% endif %}
-{% endblock %}
+{% endblock details_right %}
{% block page_content %}
@@ -256,7 +256,7 @@ src="{% static 'img/blank_image.png' %}"
-{% endblock %}
+{% endblock page_content %}
{% block js_ready %}
{{ block.super }}
@@ -266,7 +266,7 @@ src="{% static 'img/blank_image.png' %}"
$("#show-qr-code").click(function() {
showQRDialog(
'{% trans "Supplier Part QR Code" %}',
- '{"supplierpart": {{ part.pk }}}'
+ '{"supplierpart": {{ part.pk }} }'
);
});
@@ -397,4 +397,4 @@ $('#delete-part').click(function() {
enableSidebar('supplierpart');
-{% endblock %}
+{% endblock js_ready %}
diff --git a/InvenTree/label/templates/label/label_base.html b/InvenTree/label/templates/label/label_base.html
index 79913c946f..6ee1c42575 100644
--- a/InvenTree/label/templates/label/label_base.html
+++ b/InvenTree/label/templates/label/label_base.html
@@ -10,7 +10,7 @@
{% endlocalize %}
{% block margin %}
margin: 0mm;
- {% endblock %}
+ {% endblock margin %}
}
body {
@@ -35,7 +35,7 @@
{% block style %}
/* User-defined styles can go here */
- {% endblock %}
+ {% endblock style %}
@@ -44,6 +44,6 @@
{% trans "Note" %}
- {{ part.note }}{% include "clip.html"%}
+ {{ part.note }}{% include "clip.html" %}
{% trans "Forgotten your password? Enter your email address below, and we'll send you an email allowing you to reset it." %}
- -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/allauth_2fa/backup_tokens.html b/InvenTree/templates/allauth_2fa/backup_tokens.html index fac32e3e2c..35cc8c5b42 100644 --- a/InvenTree/templates/allauth_2fa/backup_tokens.html +++ b/InvenTree/templates/allauth_2fa/backup_tokens.html @@ -36,4 +36,4 @@ -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/allauth_2fa/remove.html b/InvenTree/templates/allauth_2fa/remove.html index aab3915fa8..67c9c05286 100644 --- a/InvenTree/templates/allauth_2fa/remove.html +++ b/InvenTree/templates/allauth_2fa/remove.html @@ -24,4 +24,4 @@ {% trans "Return to Site" %} -{% endblock %} +{% endblock content %} diff --git a/InvenTree/templates/allauth_2fa/setup.html b/InvenTree/templates/allauth_2fa/setup.html index 027cef905d..1fd4635fc0 100644 --- a/InvenTree/templates/allauth_2fa/setup.html +++ b/InvenTree/templates/allauth_2fa/setup.html @@ -15,7 +15,7 @@