From 032f663a8152a2f52d3b83ff3bbc9f66ced097e4 Mon Sep 17 00:00:00 2001 From: william57m Date: Thu, 6 Nov 2014 10:38:16 -0500 Subject: [PATCH] rename created by created_date --- webserver/models/order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webserver/models/order.py b/webserver/models/order.py index 7d51775..dff33ef 100644 --- a/webserver/models/order.py +++ b/webserver/models/order.py @@ -10,7 +10,7 @@ class Order(Base): number = Column(Integer, nullable=False) date = Column(DateTime, nullable=False) - created = Column(DateTime, default=datetime.now) + created_date = Column(DateTime, default=datetime.now) client_id = Column(Integer, ForeignKey('client.id')) client = relationship("Client") @@ -26,7 +26,7 @@ def to_dict(self, lines_order=True, state=True): my_dict['id'] = self.id my_dict['number'] = self.number my_dict['date'] = unicode(self.date) - my_dict['created'] = unicode(self.created) + my_dict['created_date'] = unicode(self.created_date) my_dict['client'] = self.client.to_dict() if self.client else None if state: