The following is SQLObject code and I would like to know how I would do
the same in Django?
class Order(SQLObject):
items = MultipleJoin('OrderItem', joinColumn='order_id')
class sqlmeta:
table = 'orders'
class OrderItem(SQLObject):
quantity = IntCol(notNone=True)
price = CurrencyCol(notNone=True)
total = CurrencyCol(notNone=True)
order = ForeignKey('Order')
product = ForeignKey('Product')
The key being the list of order items in the Order class?
Thanks,
Jim
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---