Re: Can a template extend a template?

2011-12-14 Thread Jason
That's a cool idea Ian. I was reluctant to put this code serverside (MVC considerations) but I see now that really it is somewhere in the app logic rather than display so it kinda fits in with that methodology... I'll give it a bash. Thanks for the explanation Russell. -- You received this

Re: Can a template extend a template?

2011-12-13 Thread Ian Clelland
On Tue, Dec 13, 2011 at 2:21 PM, Jason <1jason.whatf...@gmail.com> wrote: > Hi there, > > I love the concept of DRY, and django's enthusiasm for this concept. In > light of this I have tried to have a template extend a template, but it > doesn't seem to work. Is there a better way than what I'm

Re: Can a template extend a template?

2011-12-13 Thread Furbee
_template.html" %} > > > > _base_script.html > > > > {% if current_user %} > > > > {% extends "_logged_out_template.html" %} > > > > {% else %} > > > > {% extends "_logged_in_template.html" %} &g

Re: Can a template extend a template?

2011-12-13 Thread Russell Keith-Magee
> {% endif %} This sample suggests that you may have some misunderstandings about how Django's template language -- and the {% extends %} tag in particular -- are supposed work. {% extends %} is *not* the same as {% include %}. A template can only *extend* a single other template.

Re: Can a template extend a template?

2011-12-13 Thread Gabriel [SGT]
On Tue, Dec 13, 2011 at 7:21 PM, Jason <1jason.whatf...@gmail.com> wrote: > Hi there, > > I love the concept of DRY, and django's enthusiasm for this concept. In > light of this I have tried to have a template extend a template, but it > doesn't seem to work. Is there a better way than what I'm

Can a template extend a template?

2011-12-13 Thread Jason
Hi there, I love the concept of DRY, and django's enthusiasm for this concept. In light of this I have tried to have a template extend a template, but it doesn't seem to work. Is there a better way than what I'm currently doing? The current way index.html {% if current_user %} {%