Hi, I want to extend ForeignKeyRawIdWidget so I want to be able to use it without setting raw_id_fields.
With the following I don't get an error but I see no effect: # models.py class Product(models.Model): ... class GroupProduct(Product): ... products = models.ManyToManyField(Product, related_name="%(class)s_related") # forms.py class GroupProductAdminForm(forms.ModelForm): class Meta: model = GroupProduct widgets = { 'products': ForeignKeyRawIdWidget(GroupProduct._meta.get_field('products').rel), } This gives me an error: *init*() takes at least 2 non-keyword arguments (1 given) class GroupProductAdminForm(forms.ModelForm): class Meta: model = GroupProduct products = forms.ModelMultipleChoiceField(widget=ForeignKeyRawIdWidget(GroupProduct._meta.get_field('products').rel)) What am I doing wrong? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.