acangiani / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
1 stars 0 forks source link

TypeError: __init__() got an unexpected keyword argument 'form_class' #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reported on django-users:

http://groups.google.com/group/django-users/browse_thread/thread/79d079db754bfa6
3

Original issue reported on code.google.com by jonathan.buchanan on 31 May 2007 at 2:20

GoogleCodeExporter commented 9 years ago
Apparently form_class was introduced after django 0.96; the problem is that
tagging-0.1 includes it and doesn't warn about it.

Original comment by tobu...@gmail.com on 12 Oct 2007 at 4:10

GoogleCodeExporter commented 9 years ago
Here is a workaround, to use form_for_model anyway:

{{{
# vanilla form_for_model doesn't work due to a django 0.96/tagging-0.1 clash
def fix_tag_field(field, **kwargs):
    if field.name == 'tags':
        return tforms.TagField(**kwargs)
    return field.formfield(**kwargs)

EntityForm = forms.form_for_model(Entity, formfield_callback=fix_tag_field)
}}}

Original comment by tobu...@gmail.com on 15 Oct 2007 at 9:28

GoogleCodeExporter commented 9 years ago
No longer supporting 0.96. If there are still issues report a new issue.

Original comment by bros...@gmail.com on 22 Jan 2010 at 9:50