sunscrapers / django-templated-mail

Send emails using Django template system.
MIT License
95 stars 21 forks source link

Can't use extends on template #10

Closed amorino closed 5 years ago

amorino commented 5 years ago

Using something like {% extends 'base.html' %} returns an empty email.

bplociennik commented 4 years ago

Seems that issue still exists. I'm using version Djoser 2.0.3 and django-templated-mail 1.1.1. Result the same - empty mail without title too.

Base template:

{% block html_body %}
    HEADER
    {% block content %}{% endblock content %}
{% endblock html_body %}

Email template

{% extends 'email/base_email.html' %}

{% block subject %}
Account activation on {{ user.email }} {{ site_name }}
{% endblock subject %}

{% block html_body %}
    {{ block.super }}
    {% block content %}
        MIDDLE
    {% endblock content %}
{% endblock html_body %}
elspanishgeek commented 4 years ago

Hitting the same issue. I replicated the tests in d225ff7 and the e-mail output is empty.

AlexisMunera98 commented 3 years ago

Does anyone have an example to achieve the extensions in the template? I have found that the code in version 1.1.1 is different from the master. I also try to run the code in the master to extend the template but the result is the same.

toremato commented 2 years ago

bump