I'm creating a subset of a ModelForm.
class FavArtistForm(ModelForm):
class Meta:
model = FavArtist
fields = ('artist',)
widgets = {
'artist': CharField(),
}
The field artist is of the type ForeignKey which is by default represented by django as a select tag.
I'd rather have the user enter their own value, so I tried to change it to the CharField field.
This doesn't work.
I'm receiving the following error: AttributeError: 'CharField' object has no attribute 'is_hidden'
Is changing the default representation of a ForeignKey field not allowed in django or am I missing something ?
Regards,
Jonas.