Skip to content

{% endblock %} marked as missing in templates solely used as parent templatesΒ #74

@grondman

Description

@grondman

I'm using a parent template (never used on its own but always extended from) with the following code snippet:

    <main id="{{ page }}">
        {% if page != "home" %}
            <div class="container py-4">
        {% endif %}
        {% block content %}
        {% endblock content %}
        {% if page != "home" %}
            </div>
        {% endif %}
    </main>

The {% endblock content %} line is always marked as missing. I guess this is because I'm never using this template on its own for a view and that the contents of the actual block are always filled by a child template, but then the coverage tool mistakenly thinks that is has not seen the endblock tag in the parent template.

I've solved it now by putting both block and endblock on the same line, but it still looks like something that can be fixed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions