Re: Suggestion for improvement to template block/extends tags

2011-05-03 Thread amagee
Hi Russ. {% decorate (either "a.html" or "b.html") %} This isn't actual syntax; it's just trying to communicate that the subtemplate (not the base), can extend either a.html or b.html. It would be implemented by {% decorate base_template %}, where base_template is a context variable. This is co

Re: Suggestion for improvement to template block/extends tags

2011-05-02 Thread amagee
t would become: > > template.html: > {% decorate (either "a.html" or "b.html") %} > middle > {% enddecorate %} > > b.html: > {% decorate "a.html" %} > left {{ decorator.content }} right > {% enddecorate %} > > a.html: > first {{ decor

Re: Suggestion for improvement to template block/extends tags

2011-05-02 Thread amagee
Yes, I'm using something similar to that now; it works, but it's not as elegant as I'd like. On Apr 29, 10:19 am, legutierr wrote: > Hi amagee- > > Have you tried this? > > base_a.html > first {% block content %}{% block subcontent %}{% endblock %}{%

Suggestion for improvement to template block/extends tags

2011-04-28 Thread amagee
I sometimes run into a situation where I want a template to be able to extend from one of a set of possible base templates, which I achieve by passing a "base_template" variable in the context to the {% extends %} tag. Where this gets stuck, though, is if one of the possible bases extends one of t

possible bug in deferred objects?

2011-04-21 Thread amagee
appy. If I add "slug" to the raw() query, everything is happy. Here's the first couple of loops of the traceback: /home/amagee/tmp/managerfail2/models.pyc in test() 36 a, _ = Album.objects.get_or_create(name = "hello", package = p) 37 38 albums = Albu