Hi, I'm trying to delete a model but keep getting this error:

"getattr(): attribute name must be string"

The model is the "Item" class from the Satchmo project. I have a
feeling it's related to the ManyToManyField because I've read about it
elsewhere, and maybe even in an older thread here.

Here is the definition:

class Item(models.Model):
    category = models.ManyToManyField(Category, filter_interface=True)
    verbose_name = models.CharField("Full Name", maxlength=255)
    short_name = models.SlugField("Slug Name",
prepopulate_from=("verbose_name",), unique=True, help_text="This is a
short, descriptive name of the shirt that will be used in the URL link
to this item")
    description = models.TextField("Description of product",
help_text="This field can contain HTML and should be a few paragraphs
explaining the background of the product, and anything that would help
the potential customer make their purchase.")
    date_added = models.DateField(null=True, blank=True,
auto_now_add=True)
    active = models.BooleanField("Is product active?", default=True,
help_text="This will determine whether or not this product will appear
on the site")
    featured = models.BooleanField("Featured Item", default=False,
help_text="Featured items will show on the front page")
    option_group = models.ManyToManyField(OptionGroup,
filter_interface=True, blank=True)
    price = models.FloatField(max_digits=6, decimal_places=2,
null=True, blank=True, help_text="Base price for this item")
    weight = models.FloatField(max_digits=6, decimal_places=2,
null=True, blank=True, )
    length = models.FloatField(max_digits=6, decimal_places=2,
null=True, blank=True)
    width = models.FloatField(max_digits=6, decimal_places=2,
null=True, blank=True)
    height = models.FloatField(max_digits=6, decimal_places=2,
null=True, blank=True)
    create_subs = models.BooleanField("Create Sub Items",
default=False, help_text ="Create new sub-items")
    relatedItems = models.ManyToManyField('self', blank=True,
null=True, related_name='related')
    alsoPurchased = models.ManyToManyField('self', blank=True,
null=True, related_name='previouslyPurchased')


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to