The full error is:
TypeError at /admin/catalog/item/add/
__deepcopy__() takes exactly 2 arguments (1 given)

The model for Item has two foreign key fields and and image field. I
have seen comments suggesting it could be either of these causing the
problem. I couldn't track it down further.

Am I missing something?

The Model:
class Item(models.Model):
    name = models.CharField(maxlength=250)
    shortdesc = models.CharField(maxlength=250)
    slug = models.SlugField(prepopulate_from=('name',))
    details = models.TextField(blank=True)
    price = models.FloatField(max_digits=8, decimal_places=2)
    image = models.ImageField(upload_to='img/catalog/', blank=True)
    skuid = models.CharField(maxlength=12)
    supplier = models.ForeignKey(Supplier)
    category = models.ForeignKey(Category)
    is_public = models.BooleanField(default=True)

    class Meta:
        ordering = ['price']

    class Admin:
        list_display = ('name', 'category')
        search_fields = ('name', 'shortdesc', 'details')
        list_filter = ('category', 'price')

    def __str__(self):
        return self.name

    def get_absolute_url(self):
        return "/catalog/%s/" % self.slug


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to