Crap. Lets try this again without tabbing onto the send button.
On 1/12/06, Adrian Holovaty < [EMAIL PROTECTED]> wrote:
On 1/11/06, scum <[EMAIL PROTECTED]> wrote:
> Could the comment tag be simplified to something like {! !} or {# #}.
We've already got two different types of tags -- {% %} and {{ }} --
and introducing a third would be too complex for my tastes.
Not wanting to disagree with the glorious leader :-), but I have to say I like the idea.
First off; comments should always be encouraged, and the easiest way to make something
+1 to that.
I just did a project in django and the templates were managed by a designer and he would make many mistakes, like not copying {% if %} {% endif %} around {{ variable }} when moving the variable around. Also its not very clear when modifying templates what all variables are available, and I had to regularly go back to view code to reconfirm the variable names etc. Comments are extreamly helpful, and any work to make them easy or encourage them is well worth it, and making a special {! !} would make it all the more obvious in the documentation, after all the first thing we read about templates is the template tags.
Another request: if debug is on, and if the url contains ?dumpTemplateContext, and client IP in settings.trusted_hosts [and blah blah blah depending on how paranoid you are], render_to_response, and family, ignores the actual template, and instead dumpts the context variable passed, and detailed instuctions about their type, and some comment on how to loop if the variable is list like and so on. This is meant to be used by the designers who would be creating template, so it can contain a link to tutorial, or dump the tutorial and faq and everything, anything to make the job of designer easier.
Amit Upadhyay
Blog: http://www.rootshell.be/~upadhyay
+91-9867-359-701
