Hi,

I noticed that an app's template can't extend a template with exactly the
same path in another app. Recently I had a need to extend such a template,
called 'accounts/edit_profile/base.html', so I renamed it
to 'accounts/edit_profile/core_base.html' and added a new
template 'accounts/edit_profile/base.html' which only contains one line:

{% extends 'accounts/edit_profile/core_base.html' %}

And then, in the other app, I extend the same template with my changes:

{% extends 'accounts/edit_profile/core_base.html' %}


{% load core_tags_and_filters %}
{% load i18n %}

{% block edit_profile_links_1 %}
    {% if request.user.profile.is_active %}
        <my html code>

    {% endif %}
{% endblock %}

Is this the correct way to do this? Or is there a better way to extend
templates?

Thanks,
Uri.

אורי
u...@speedy.net

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABD5YeF8uDqt9uY%3Dy70ev-UotZdUV28dFLK4awAXvSDnukmFTg%40mail.gmail.com.

Reply via email to