I think I've solved this myself.
I needed two fields for description: one for the description pk (in
case it is pre-existing) and one for the text.
I changed the widget for the description via RateForm.Meta.widgets to
a HiddenInput widget, and added the text field
to the form separately.
In
I have a table of Rates:
class Rate( models.Model ):
edition = ForeignKey( Edition )
description = ForeignKey( Foo )
rate = IntegerField( )
...
[ other fields not relevant here ]
and a RateForm:
class RateForm( forms.ModelForm ):
class Meta:
fields = ( 'description',
2 matches
Mail list logo