> I tried that, but I get the same error, the traceback displays that
> line as the "buggy" one: for item in self.orderitem_set.all():

    def count_items(self):
        items = 0
        for item in self.fielddef_set.all():
            items += item.id
        return items

I added that to one of my models just to test, and it works fine for
me (adding ids since I have no quantity field).  I'm still on .96 and
using postrgres though.  Sorry I don't have an answer, hopefully
someone else will!

> Each cart won't have many items, so I guess counting them is not going
> to be a demanding process, right?

I'd be more worried about pulling all the item(s) info over just to
get a sum than the counting, but if you need to display item info
anyway it probably doesn't matter at all.   Especiallly if you used
select_related() on the getting the order in the first place.


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