Here another problem: "Re-using Template Snippets - Where's my {%with
%}"
http://groups.google.com/group/google-appengine/browse_thread/thread/9896097ec049cff6/156e2500cc58a732#156e2500cc58a732"""I'd happily switch to a different template language that would allow me to re-use snippets, but it looks like most template languages don't work on appengine""" PyOoHtml works! On Aug 24, 7:07 pm, Davide Rognoni <[EMAIL PROTECTED]> wrote: > Here another problem "parsing xml in the > template"http://groups.google.com/group/google-appengine/browse_thread/thread/... > > The response: "Django template syntax is more limited than standard > Python syntax..." > > My response is "PyOoHtml - Python Object Oriented HTML" (but it need > more code to resolve the common problems) > > On Aug 24, 6:39 pm,DavideRognoni<[EMAIL PROTECTED]> wrote: > > > and > > > """Variable names must consist of any letter (A-Z), any digit (0-9), > > an underscore or a dot. > > > Dots have a special meaning in template rendering. A dot in a variable > > name signifies lookup. Specifically, when the template system > > encounters a dot in a variable name, it tries the following lookups, > > in this order: > > > - Dictionary lookup. Example: foo["bar"] > > - Attribute lookup. Example: foo.bar > > - Method call. Example: foo.bar() > > - List-index lookup. Example: foo[bar] > > > The template system uses the first lookup type that works. It’s short- > > circuit > > logic."""http://www.djangoproject.com/documentation/templates_python/ > > > but I like Python syntax thenhttp://pypi.python.org/pypi/PyOoHtml/ > > :-) > > > On Aug 24, 6:05 pm,DavideRognoni<[EMAIL PROTECTED]> wrote: > > > > "A method call will only work if the method has no required > > > arguments"http://www.djangoproject.com/documentation/templates_python/ > > > > On Aug 24, 4:27 pm, "djidjadji BG" <[EMAIL PROTECTED]> wrote: > > > > > HiDavide, > > > > >http://www.djangoproject.com/documentation/templates/ > > > > The Section "Behind the scenes' > > > > > If the method has no parameters you can use > > > > > {{ model.key }} > > > > > If it is a tuple of list you can use > > > > > {{ item.0 }} > > > > > Is it possible to call methods that have parameters in the Django > > > > template? > > > > > Djidjadji > > > > > 2008/8/24DavideRognoni<[EMAIL PROTECTED]>: > > > > > > Into Django templates you can not use Python syntax, for example: > > > > > > {{model.key()}} > > > > > TemplateSyntaxError: Could not parse the remainder: () > > > > >http://groups.google.com/group/google-appengine/browse_thread/thread/... > > > > > > {{item[0]}} > > > > > TemplateSyntaxError: Could not parse the remainder: [1] > > > > >http://groups.google.com/group/google-appengine/browse_thread/thread/... > > > > > > If you want to use the Python syntax, you can use: > > > > >http://pypi.python.org/pypi/PyOoHtml/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
