Исправил отображение заказов в админке
This commit is contained in:
@@ -75,6 +75,9 @@ class Order(models.Model):
|
||||
phone_num = models.CharField(max_length=150,null=True, blank = True) #контактный телефон
|
||||
cancelled = models.BooleanField(default=False) #отменен
|
||||
|
||||
def __unicode__(self):
|
||||
return ', '.join((self.date.strftime('%d %b %Y'), self.product.name, self.address))
|
||||
|
||||
@property
|
||||
def date_dmy(self):
|
||||
return self.date.strftime("%d/%m/%Y")
|
||||
|
||||
Reference in New Issue
Block a user