Commit fd945513 authored by Administrator's avatar Administrator

[fix] 修改模型的显示, 因为字段默认会加上Class的Name

parent 51c530c1
...@@ -18,7 +18,7 @@ class AnsiblePlay(models.Model): ...@@ -18,7 +18,7 @@ class AnsiblePlay(models.Model):
status_code = models.IntegerField(default=0, verbose_name=_('StatusCode')) status_code = models.IntegerField(default=0, verbose_name=_('StatusCode'))
def __unicode__(self): def __unicode__(self):
return "AnsiblePlay: %s<%s>" % (self.name, self.uuid) return "%s<%s>" % (self.name, self.uuid)
class AnsibleTask(models.Model): class AnsibleTask(models.Model):
...@@ -27,7 +27,7 @@ class AnsibleTask(models.Model): ...@@ -27,7 +27,7 @@ class AnsibleTask(models.Model):
name = models.CharField(max_length=128, blank=True, verbose_name=_('Name')) name = models.CharField(max_length=128, blank=True, verbose_name=_('Name'))
def __unicode__(self): def __unicode__(self):
return "AnsibleTask: %s<%s>" % (self.name, self.uuid) return "%s<%s>" % (self.name, self.uuid)
def failed(self): def failed(self):
pass pass
...@@ -47,7 +47,7 @@ class AnsibleHostResult(models.Model): ...@@ -47,7 +47,7 @@ class AnsibleHostResult(models.Model):
no_host = models.TextField(blank=True, verbose_name=_('NoHost')) no_host = models.TextField(blank=True, verbose_name=_('NoHost'))
def __unicode__(self): def __unicode__(self):
return "AnsibleHostResult: %s<%s>" % (self.name, str(self.status)) return "%s<%s>" % (self.name, str(self.status))
@property @property
def is_failed(self): def is_failed(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment