--
---
Александр Кошелев
daev...@gmail.com
It is very, very, very, very important to read the big warning at the
top of the template documentation, which states that the Django
template language *is not* just Python code embedded in HTML, and
which explains that only the specific things described in the
documentation will work. A large part of your problem seems to be that
you're ignoring this and simply dumping random Python expressions into
a template, when it's clearly stated that you can't do that (well, you
can, it just won't do anything useful).
You might want to take a step back and go through the template
documentation thoroughly, then think about how you're structuring the
data that's passed into your templates; in the overwhelming majority
of cases, attempts to put this much logic into a template (which is
meant to provide the bare minimum of logical constructs needed to
present data) imply a problem somewhere else in the code.
--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."