On May 16, 6:27 am, Greg Taylor <[EMAIL PROTECTED]> wrote:
> class Form_SKU(ModelForm):
> """
> The form for updating SKUs.
> """
> selected = self.instance.colors
``self`` isn't in scope here, try the code below (and it wouldn't hurt
to read-up on Python OOP).
class Form_SKU(ModelForm):
def __init__(self, *args, **kwargs):
super(Form_SKU, self).__init__(*args, **kwargs)
if self.instance:
selected = self.instance.colors
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---