Add __repr__ to models
This commit is contained in:
@@ -20,3 +20,8 @@ class Project(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
|
||||
@property
|
||||
def displayname(self):
|
||||
return self.name
|
||||
|
||||
def __repr__(self):
|
||||
return "<Project(name='{}', description='{}', workspace='{}', id='{}')>".format(
|
||||
self.name, self.description, self.workspace.name, self.id
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user