Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Child templates should work without needing to override every block. #224

Closed
luqmana opened this issue Mar 18, 2019 · 1 comment
Closed

Comments

@luqmana
Copy link

luqmana commented Mar 18, 2019

Given this setup:

base.html:

<!DOCTYPE html>
<html lang="en">
  <head>
    {% block head %}
    <meta charset="utf-8" />
    <title>Title</title>
    {% endblock %}
  </head>
  <body>
    <main>
      {% block content %}{% endblock %}
    </main>
    <footer>
      {% block footer %}{% endblock %}
    </footer>
  </body>
</html>

child.html

{% extends "base.html" %}

Nothing actually gets rendered and there isn't any compiler error.

Specifying any block in the child seems to make it work:

{% extends "base-ex.html" %}

{% block content %}{% endblock %}

This is using v0.8.0

@djc djc closed this as completed in cdaf7ea Mar 18, 2019
@djc
Copy link
Owner

djc commented Mar 18, 2019

Good catch, thanks for reporting! This is probably a regression, even. Fixed in cdaf7ea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants