def serialize(self): """Return object data in easily serializeable format""" return { 'id': self.id, 'note': self.note, 'percent': self.percent, 'date_created': dump_datetime(self.date_created), 'task_id': self.task_id, 'owner': self.owner.full_name }
def serialize(self): """Return object data in easily serializeable format""" return { 'id': self.id, 'name': self.name, 'group1': self.group1, 'group2': self.group2, 't': self.t, 'user_id': self.user_id, 'time': dump_datetime(self.time), }
def serialize(self): """Return object data in easily serializeable format""" return { 'id': self.id, 'full_name': self.full_name, 'username': self.username, 'email': self.email, 'account_type': self.account_type, 'date_created': dump_datetime(self.date_created), # This is an example how to deal with Many2Many relations # 'projects': self.serialize_projects }
def serialize(self): """Return object data in easily serializeable format""" return { 'id': self.id, 'title': self.title, 'budget': self.budget, 'description': self.description, 'project_id': self.project_id, 'percent': self.percent, 'owner_id': self.owner_id, 'start_date': self.start_date, 'start_date_format': dump_datetime(self.start_date), 'deadline': self.deadline, 'deadline_format': dump_datetime(self.deadline), 'status': self.status, 'statusText': self.statusText, 'date_created': dump_datetime(self.date_created), # This is an example how to deal with Many2Many relations 'owner': self.owner.serialize, 'history': self.serialize_history }
def serialize(self): """Return object data in easily serializeable format""" return { 'id': self.id, 'title': self.title, 'description': self.description, 'budget_limit': self.budget_limit, 'start_date': self.start_date, 'end_date': self.end_date, 'status': self.status, 'completion': self.completion, 'date_created': dump_datetime(self.date_created), # This is an example how to deal with Many2Many relations 'owner': self.serialize_owner }
def date_created_string(self): return dump_datetime(self.date_created)
def string_date(self, value): return dump_datetime(value)
def deadline_string(self): return dump_datetime(self.deadline)