On Wed, Mar 6, 2013 at 10:55 PM, Sam Solomon wrote:
> Tom Evans has probably the correct answer for you, but another thing that
> def some_view(request):
> return render(request, "path/to/template.html", {"view_context": ...}) #
> The "render(request" portion will automatically send the base_
Tom Evans has probably the correct answer for you, but another thing that
I've done (maybe not 100% applicable in this case) is to have a default
base and then make it extendable from views when necessary:
{% extends base_template|default:"base.html" %}
This sounds like it isn't applicable in y
On Wed, Mar 6, 2013 at 2:39 AM, Shawn Milochik wrote:
> Instead of extends, you could use the "include" directive.
>
"include" worked but destroyed all the structure of the template. :-/
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message
On Tue, Mar 5, 2013 at 9:06 PM, Sandeep kaur wrote:
> I want to extend the base template file into the child file depending
> on the condition, like if the user is superuser or staff or active
> user, the file to extended should ll be different.
> For Eg :
>
> {% if user.is_superuser %}
>
Instead of extends, you could use the "include" directive.
--
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 post to
I want to extend the base template file into the child file depending
on the condition, like if the user is superuser or staff or active
user, the file to extended should ll be different.
For Eg :
{% if user.is_superuser %}
{% extends "base.html" %}
{% else if user.is_active %}
{%
6 matches
Mail list logo