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):
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'
>
>
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
3 matches
Mail list logo