On Mon, Sep 21, 2009 at 10:05 AM, phoebebright <[email protected]>wrote:
> > Have been stuck on this one for a couple of days so hoping for some > enlightenment from some more able django users. Am aware of the > 'gotcha' where the model name matches and attribute or one of the Meta > values. > > I am getting this when a form is instantiated with an existing object > - no problem if the form is blank. > Since you are getting an error when the form is instantiated with an existing object, that would have been more helpful code to post than the model definition. It appears based on the error you are getting that in this case you are passing the existing object as the first positional argument? At any rate the model instance you are using appears to be getting assigned to the form data attribute, which could happen if you are passing the instance as the first positional argument when you create the form. I do not think the problem has anything to do with the names of the fields in your model but rather it has to do with exactly what code you are using to create the form when you have an existing instance you want to use. Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

