Re: More questions on models

2006-11-27 Thread Brian Beck
Jim Fritchman wrote: > The key being the list of order items in the Order class? Hi Jim, I think the closest equivalent would be: from django.db.models import * class Order(Model): class Meta: db_table = 'orders' class Product(Model): pass class OrderItem(Model):

Re: More questions on models

2006-11-27 Thread Russell Keith-Magee
On 11/28/06, Jim Fritchman <[EMAIL PROTECTED]> wrote: > > 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' > >

More questions on models

2006-11-27 Thread Jim Fritchman
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