Исправил отображение заказов в админке

This commit is contained in:
2015-05-11 11:18:28 +05:00
parent f29ab42443
commit 6a7098b6e7

View File

@@ -75,6 +75,9 @@ class Order(models.Model):
phone_num = models.CharField(max_length=150,null=True, blank = True) #контактный телефон phone_num = models.CharField(max_length=150,null=True, blank = True) #контактный телефон
cancelled = models.BooleanField(default=False) #отменен cancelled = models.BooleanField(default=False) #отменен
def __unicode__(self):
return ', '.join((self.date.strftime('%d %b %Y'), self.product.name, self.address))
@property @property
def date_dmy(self): def date_dmy(self):
return self.date.strftime("%d/%m/%Y") return self.date.strftime("%d/%m/%Y")