Invalid block tag: render_comment_form

223 views
Skip to first unread message

Florian Lindner

unread,
Nov 30, 2008, 11:59:16 AM11/30/08
to Django users
Hello,

I use the comments framework from the newest Django SVN checkout.

I have in my template:

{% load comments % }
[...]
{% render_comment_form for object %}

resulting in a Invalid block tag: 'render_comment_form'

I have found the same error in one other posting but no solution. What
is wrong?

Thanks,

Florian

Gavin McQuillan

unread,
Dec 17, 2008, 9:38:12 PM12/17/08
to django...@googlegroups.com
Florian,

I've found the following link to be helpful:

http://code.djangoproject.com/wiki/UsingFreeComment

For Django 1.0, you should replaces all instances of "free_comment*" with just comment*, in both files and function names.

However, I'll add that I'm stuck on a similar problem.

The document asks you to use the following code to display the comment form:
{% comment_form for blog.entry object.id %}

It fails in a very similar way to what you describe. However, if you replace 'comment_form' with 'render_comment_form' you no longer get the error and you don't get the form either.

Maybe you'll progress further than I have,

-Gavin

MariusB

unread,
Jan 1, 2009, 8:45:28 AM1/1/09
to Django users
I'm also using Django 1.0 [1.0-final-SVN-unknown] and I was getting
Invalid block tag errors while using both:
* {% comment_form %} and
* {% free_comment_form %}

The solution that works for me is: {% render_comment_form %} with the
syntax:
* {% render_comment_form for [object] %}
* {% render_comment_form for [app].[model] [object_id] %}

(Solution via http://tinyurl.com/render-comment-form)

Hope it helps,
Marius

On Dec 18 2008, 4:38 am, "Gavin McQuillan" <gavin.mcquil...@gmail.com>
wrote:
> Florian,
>
> I've found the following link to be helpful:
>
> http://code.djangoproject.com/wiki/UsingFreeComment
>
> For Django 1.0, you should replaces all instances of "free_comment*" with
> just comment*, in both files and function names.
>
> However, I'll add that I'm stuck on a similar problem.
>
> The document asks you to use the following code to display the comment form:
> {% comment_form for blog.entry object.id %}
>
> It fails in a very similar way to what you describe. However, if you replace
> 'comment_form' with 'render_comment_form' you no longer get the error and
> you don't get the form either.
>
> Maybe you'll progress further than I have,
>
> -Gavin
>
Reply all
Reply to author
Forward
0 new messages