Re: Inline Form Error After Upgrade to Django 1.3

2011-04-18 Thread Chris Spencer
Awesome, that was it. My old code now works again. Thanks! Chris On Mon, Apr 18, 2011 at 5:47 PM, akaariai wrote: > On Apr 19, 12:17 am, Chris Spencer wrote: > > Thanks. However, changing the line to: > > > > if not self.instance.state.adding: > > > > results in essentially the same error:

Re: Inline Form Error After Upgrade to Django 1.3

2011-04-18 Thread akaariai
On Apr 19, 12:17 am, Chris Spencer wrote: > Thanks. However, changing the line to: > >     if not self.instance.state.adding: > > results in essentially the same error: > > AttributeError: 'MyModel' object has no attribute 'state' Doh, that should of course be ._state. Sorry for the mistake. -

Re: Inline Form Error After Upgrade to Django 1.3

2011-04-18 Thread Chris Spencer
Thanks. However, changing the line to: if not self.instance.state.adding: results in essentially the same error: AttributeError: 'MyModel' object has no attribute 'state' On Mon, Apr 18, 2011 at 4:48 PM, akaariai wrote: > On Apr 18, 11:08 pm, Chris wrote: > > I have an inline form used i

Re: Inline Form Error After Upgrade to Django 1.3

2011-04-18 Thread akaariai
On Apr 18, 11:08 pm, Chris wrote: > I have an inline form used in my admin that looks up the value for the > associated model, and dynamically selects the form field widget that's > appropriate for the data. The class looks like: > > class MyModelInlineForm(ModelForm): >     attribute_model = Mode

Inline Form Error After Upgrade to Django 1.3

2011-04-18 Thread Chris
I have an inline form used in my admin that looks up the value for the associated model, and dynamically selects the form field widget that's appropriate for the data. The class looks like: class MyModelInlineForm(ModelForm): attribute_model = ModelChoiceField(queryset=None) def __init__(s