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:
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.
-
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
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
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
5 matches
Mail list logo