From 8f59fc7c8dd9f8c139c0aed8ba8c7d31d89619b9 Mon Sep 17 00:00:00 2001 From: Dusty Phillips Date: Fri, 6 Feb 2009 17:11:00 -0500 Subject: Use __unicode__ over __str__ --- main/models.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'main') diff --git a/main/models.py b/main/models.py index 7f7f42d..dcd49cd 100644 --- a/main/models.py +++ b/main/models.py @@ -90,7 +90,7 @@ class Press(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_length=255) url = models.CharField(max_length=255) - def __str__(self): + def __unicode__(self): return self.name class Meta: db_table = 'press' @@ -101,7 +101,7 @@ class AltForum(models.Model): language = models.CharField(max_length=255) url = models.CharField(max_length=255) name = models.CharField(max_length=255) - def __str__(self): + def __unicode__(self): return self.name class Meta: db_table = 'alt_forums' @@ -110,7 +110,7 @@ class AltForum(models.Model): class Donor(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_length=255) - def __str__(self): + def __unicode__(self): return self.name class Meta: db_table = 'donors' @@ -122,7 +122,7 @@ class News(models.Model): postdate = models.DateField(auto_now_add=True) title = models.CharField(max_length=255) content = models.TextField() - def __str__(self): + def __unicode__(self): return self.title class Meta: db_table = 'news' @@ -136,7 +136,7 @@ class News(models.Model): class Arch(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_length=255,unique=True) - def __str__(self): + def __unicode__(self): return self.name class Meta: db_table = 'arches' @@ -146,7 +146,7 @@ class Arch(models.Model): class Repo(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_length=255,unique=True) - def __str__(self): + def __unicode__(self): return self.name class Meta: db_table = 'repos' @@ -173,7 +173,7 @@ class Package(models.Model): #get_latest_by = 'last_update' #ordering = ('-last_update',) - def __str__(self): + def __unicode__(self): return self.pkgname # According to http://code.djangoproject.com/ticket/2583 we have "bad data" @@ -278,7 +278,7 @@ class Todolist(models.Model): description = models.TextField() date_added = models.DateField(auto_now_add=True) objects = TodolistManager() - def __str__(self): + def __unicode__(self): return self.name @property -- cgit v1.2.3-24-g4f1b