You can also have a base template, with a block for the title then
extends that base template with the extends tags.
2016-11-07 20:25 GMT+01:00 Moreplavec :
> Yes, i know i can pass data (variables) from view to template. But my
> question is, if i have report, for example with headline "This mont
= this_month %}Current{% elif month = last_month %}Previous{% else
%}{{ month }}{% endif %} Report
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Moreplavec
Sent: Monday, November 7, 2016 1:25 PM
To: Django users
Subject: Re: One template for multiple views
Yes, i know i can pass data (variables) from view to template. But my
question is, if i have report, for example with headline "This month" and
same report for previous with headline "Previous month", if i can such
things solve directly in template, based on view which is calling template.
I do
Hi,
I'm not sure I completely understand what you need but if I do, I think
passing different contexts to the same template would help you achieve
that.
You could easily have something like :
def initial_view(request) :
variableone = 'a'
variabletwo = 'b'
return response(you
Greetings,
i'm creating template for simple table report. Data shown are for current
month. Than i realised i need same report for previous month. I can copy
created template and modify texts, but i don't like. Is it possible to use
same template for more views and only controll differences ba
5 matches
Mail list logo