Is there a way to execute a method in a template? I'm just learning
the Google App Engine, and would like to be able to insert the key
value for an entity along with the data for that entity: So, I want
something similar to this:
{% for greeting in greetings %}
{% if greeting.author %}
<b>{{ greeting.author.nickname }}</b> wrote:
{% else %}
An anonymous person wrote:
{% endif %}
<blockquote>{{ greeting.content|escape }}</blockquote>
<form action="/delete" method="post"><input type="submit"
value="Delete">
<textarea name="content" rows="1" cols="10"> {{ greeting.key()
}}</
textarea>
</form>
{% endfor %}
Notice the call on "greeting.key()". However, unless I'm missing
something, there is no way to actually invoke a method from within a
Django template. What's my best option--build up the output within the
Python code? Use some trick of which I'm not aware? All suggestions
welcome.
Thanks,
Ken McDonald
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---