Add a prefix do Django comment form
Posted
by Stefan Manastirliu
on Stack Overflow
See other posts from Stack Overflow
or by Stefan Manastirliu
Published on 2010-04-07T11:05:04Z
Indexed on
2010/04/07
23:23 UTC
Read the original article
Hit count: 358
django-forms
|django
I would like to add a prefix to each django comment form. I'm using multiply comment forms in the same page and depsite it's working well, i don't like having many input fields with the same id attribute like <input type="text" name="honeypot" id="id_honeypot" />
.
So, is there a way to tell django do add a prefix to each form instance? I know i can do it with other forms when i create a form instance in this waynewform = CustomForm(prefix="a")
but using Django's comment system, this part is handled by a comment template tag {% get_comment_form for [object] as [varname] %}
.
Can I tell to the template tag to add a prefix?
© Stack Overflow or respective owner