from the "Philosophy" section of the template docs:
"Django template system is not simply Python embedded into HTML. This
is by design: the template system is meant to express presentation,
not program logic."
in other words, the Django designers considered about embedding Python
and decided against it.
--
Javier
Victor Buldakov wrote:
> my name is Victor Buldakov,
> I would like to participate in "Google Summer Of Code-2012" with the
> project on Django framework.
>
> Django templates is a simple and flexible tool. But I think that
> they unpythonic.
> That is the reason why it is less flexible than, for exampe,
> configuration files.
>
> In my project I would like to develop the support of block with use
> of the python code.
> In my opinion, it would make Django templates more flexible and
> power.
I'm excited that you're interested in participating in our GSoC program
-- if we're accepted, of course. Note that the application period for
sponsoring organizations isn't even open yet, and Django's acceptance is
far from a certain thing. We obviously are going to apply again and hope
to be accepted, but that's a ways off still.
I have to say, though, that this proposal is pretty much a non-starter.
We're attached to our template language, so while we might consider
proposals to improve it, changing its basic philosophy is out of the
question.
I hope you'll take the time to come up with other ideas. We'll be
working on some suggestions over the next couple of months while
applications are being processed.
In the meantime, you'll want to start contributing *now*: we rarely
accept students who haven't been a part of the project for some time. If
you dive in and start making your name known around here you'll greatly
improve your chances of being accepted.
I believe someone recently suggested incorporating less
(http://lesscss.org/) and bootstrap
(http://twitter.github.com/bootstrap) into Django, and this might be
something you're interested in. At any rate, this list is full of good
propositions.
Cheers,
Jonathan