Adrian Holovaty wrote: > On 2/22/06, Ivan Fedorov <[EMAIL PROTECTED]> wrote: > > What is Jinja? > > > > Jinja is a text-based template language similar to cheetah and Smarty. > > The syntax and parts of the code where taken from the django template. > > > > http://wsgiarea.pocoo.org/jinja/ > > Hey Ivan, > > What are the differences between Jinja and Django's template system? > At a glance, I see little things such as different available default > template filters and the fact that you have to use stuff like > FileSystemLoader()? Jinja isn't compatible with django templates. It uses a parser for the tag arguments and features some other syntax elements like {% marker %} / {% range %}...
For my colubrid projects I wanted to have a django spin off with a improved argument handling. For example it's possible to do this: <table> {% for variable in list %} <tr class="{% cycle 'row1', 'row2', 'row3', variable inline %}"> <th>{{ variable.text | replace "demo", "other" | escapexml }}</th> <td>{% print variable.value | escapexml %}</td> </tr> {% endfor %} </table> Heiko Wundram worked hard on a easy to extend argument parser which is explained here: http://wsgiarea.pocoo.org/jinja/docs/tag-dev.html > Rather than creating a separate project, why not just integrate your > changes into Django templates proper? We're going to make them > downloadable as a standalone package for Django's next version. Because it's a complete rewrite. I started it for improving my python skills and because I was sick of kid and cheeath ^^ I don't think that it can replace / should replace the current template sytem. Regards, Armin appendix: because of my bad english i've copied and modified some parts of the django template documentation. Sorry for that, I will rewrite those parts in the next days. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---