Convert all __unicode__ methods into __str__.
parent
05d36688f8
commit
ed8f6bae27
|
@ -42,5 +42,5 @@ class Role(models.Model):
|
|||
verbose_name_plural = u'roles'
|
||||
ordering = ['slug']
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
|
@ -42,7 +42,7 @@ class Document(models.Model):
|
|||
('view_documents', 'Can modify owned documents'),
|
||||
)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
|
|
@ -26,7 +26,7 @@ class Priority(models.Model):
|
|||
ordering = ["project", "name"]
|
||||
unique_together = ("project", "name")
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"project {0} - {1}".format(self.project_id, self.name)
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ class Severity(models.Model):
|
|||
ordering = ["project", "name"]
|
||||
unique_together = ("project", "name")
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"project {0} - {1}".format(self.project_id, self.name)
|
||||
|
||||
|
||||
|
@ -60,7 +60,7 @@ class IssueStatus(models.Model):
|
|||
ordering = ["project", "name"]
|
||||
unique_together = ("project", "name")
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"project {0} - {1}".format(self.project_id, self.name)
|
||||
|
||||
|
||||
|
@ -76,7 +76,7 @@ class IssueType(models.Model):
|
|||
ordering = ["project", "name"]
|
||||
unique_together = ("project", "name")
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"project {0} - {1}".format(self.project_id, self.name)
|
||||
|
||||
|
||||
|
@ -145,7 +145,7 @@ class Issue(models.Model, WatchedMixin):
|
|||
("view_issue", "Can view the issue"),
|
||||
)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"({1}) {0}".format(self.ref, self.subject)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
|
|
@ -54,7 +54,7 @@ class Milestone(models.Model, WatchedMixin):
|
|||
("view_milestone", "Can view milestones"),
|
||||
)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def __repr__(self):
|
||||
|
|
|
@ -40,7 +40,7 @@ class Attachment(models.Model):
|
|||
verbose_name_plural = u"attachments"
|
||||
ordering = ["project", "created_date"]
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"content_type {0} - object_id {1} - attachment {2}".format(
|
||||
self.content_type, self.object_id, self.id)
|
||||
|
||||
|
@ -108,7 +108,7 @@ class Project(models.Model, WatchedMixin):
|
|||
("manage_users", "Can manage users"),
|
||||
)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def __repr__(self):
|
||||
|
|
|
@ -31,7 +31,7 @@ class QuestionStatus(models.Model):
|
|||
ordering = ["project", "name"]
|
||||
unique_together = ("project", "name")
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"project {0} - {1}".format(self.project_id, self.name)
|
||||
|
||||
|
||||
|
@ -92,7 +92,7 @@ class Question(models.Model, WatchedMixin):
|
|||
("view_question", _(u"Can view the question")),
|
||||
)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return self.subject
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
|
|
@ -30,7 +30,7 @@ class TaskStatus(models.Model):
|
|||
ordering = ["project", "name"]
|
||||
unique_together = ("project", "name")
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"project {0} - {1}".format(self.project_id, self.name)
|
||||
|
||||
|
||||
|
@ -94,7 +94,7 @@ class Task(models.Model, WatchedMixin):
|
|||
("add_task_to_us", "Can add tasks to a user story"),
|
||||
)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"({1}) {0}".format(self.ref, self.subject)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
|
|
@ -29,7 +29,7 @@ class UserStoryStatus(models.Model):
|
|||
ordering = ["project", "name"]
|
||||
unique_together = ("project", "name")
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"project {0} - {1}".format(self.project_id, self.name)
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ class Points(models.Model):
|
|||
ordering = ["project", "name"]
|
||||
unique_together = ("project", "name")
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"project {0} - {1}".format(self.project_id, self.name)
|
||||
|
||||
|
||||
|
@ -129,7 +129,7 @@ class UserStory(WatchedMixin, models.Model):
|
|||
("add_userstory_to_milestones", "Can add user stories to milestones"),
|
||||
)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return u"({1}) {0}".format(self.ref, self.subject)
|
||||
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Reference in New Issue