Re: One template for multiple views

2016-11-07 Thread ludovic coues
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

RE: One template for multiple views

2016-11-07 Thread Matthew Pava
= 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

Re: One template for multiple views

2016-11-07 Thread 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 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

Re: One template for multiple views

2016-11-02 Thread Lekan Wahab
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

One template for multiple views

2016-11-02 Thread Moreplavec
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