I ran into this also.

I need to do a {% get_comment_form for story as form %} early on in
the template so I can do {{ form.media }} inside a block. I found that
I had to call get_comment_form twice, once in a block for CSS and once
in the block for content.

{% extends 'base.html' %}
{% block custom_js %}
{% get_comment_form for story as form %}
{{ form.media }}
{% endblock %}
...... a bunch of stuff omitted
{% block content %}
......
{% get_comment_form for story as form %}
{{ form.as_p }}
...
{% endblock %}

If I put the get_comment_form tag outside of these blocks, the render
method is never called.

Thanks.
BN

On Jan 12, 11:49 am, "Rachel Willmer" <rwill...@gmail.com> wrote:
> Answering my own question...
>
> It seems that I can fix the problem by moving the call to inside the block.
>
> So my template needs to look like
> {% extends "base.html" %}
>
> {% load mytaglibrary %}
>
> {% block content %}
> {% get_mytag as mytag %}
> {{ mytag.name }}
> {% endblock %}
>
> whereas before the line with get_mytag was outside the block.
>
> Rachel
>
> 2009/1/12 Rachel Willmer <rwill...@gmail.com>:
>
> > I'm debugging a template tag which used to work under V0.96 and now
> > doesn't under V1.
>
> > Using logging, I can see that its __init__ function iscalled, 
> > butrenderisn't.
>
> > Any pointers as to why or how I debug this would be very gratefully received
>
> > Rachel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to