I agree with the DateTimeField change, but shouldn't null map to False and any timestamp map to True?  I feel like that's reasonably clear (and it's the semantics I used for purchase_time)


On Aug 21, 2013, at 2:21 PM, David Ormsbee <notifications@github.com> wrote:

> In lms/djangoapps/shoppingcart/models.py:
> 
> > +    Order items are line items that fill up the shopping carts and orders.
> > +
> > +    Each implementation of OrderItem should provide its own purchased_callback as
> > +    a method.
> > +    """
> > +    objects = InheritanceManager()
> > +    order = models.ForeignKey(Order, db_index=True)
> > +    # this is denormalized, but convenient for SQL queries for reports, etc. user should always be = order.user
> > +    user = models.ForeignKey(User, db_index=True)
> > +    # this is denormalized, but convenient for SQL queries for reports, etc. status should always be = order.status
> > +    status = models.CharField(max_length=32, default='cart', choices=ORDER_STATUSES)
> > +    qty = models.IntegerField(default=1)
> > +    unit_cost = models.DecimalField(default=0.0, decimal_places=2, max_digits=30)
> > +    line_desc = models.CharField(default="Misc. Item", max_length=1024)
> > +    currency = models.CharField(default="usd", max_length=8)  # lower case ISO currency codes
> > +    fulfilled_time = models.DateField(null=True, blank=True)
> Should be a DateTimeField. Also, there's no need for it to allow nulls, since it should default to False and only be set to true after fulfillment is complete.
> 
> —
> Reply to this email directly or view it on GitHub.
>