Ticket #4109: 4109.diff
File 4109.diff, 3.5 KB (added by , 18 years ago) |
---|
-
django/contrib/redirects/models.py
20 20 list_filter = ('site',) 21 21 search_fields = ('old_path', 'new_path') 22 22 23 def __ str__(self):24 return "%s ---> %s" % (self.old_path, self.new_path)23 def __unicode__(self): 24 return u"%s ---> %s" % (self.old_path, self.new_path) -
django/contrib/sites/models.py
19 19 list_display = ('domain', 'name') 20 20 search_fields = ('domain', 'name') 21 21 22 def __ str__(self):22 def __unicode__(self): 23 23 return self.domain -
django/contrib/contenttypes/models.py
42 42 ordering = ('name',) 43 43 unique_together = (('app_label', 'model'),) 44 44 45 def __ str__(self):45 def __unicode__(self): 46 46 return self.name 47 47 48 48 def model_class(self): -
django/contrib/auth/models.py
45 45 unique_together = (('content_type', 'codename'),) 46 46 ordering = ('content_type', 'codename') 47 47 48 def __ str__(self):49 return "%s | %s | %s" % (self.content_type.app_label, self.content_type, self.name)48 def __unicode__(self): 49 return u"%s | %s | %s" % (self.content_type.app_label, self.content_type, self.name) 50 50 51 51 class Group(models.Model): 52 52 """Groups are a generic way of categorizing users to apply permissions, or some other label, to those users. A user can belong to any number of groups. … … 66 66 class Admin: 67 67 search_fields = ('name',) 68 68 69 def __ str__(self):69 def __unicode__(self): 70 70 return self.name 71 71 72 72 class UserManager(models.Manager): … … 122 122 list_filter = ('is_staff', 'is_superuser') 123 123 search_fields = ('username', 'first_name', 'last_name', 'email') 124 124 125 def __ str__(self):125 def __unicode__(self): 126 126 return self.username 127 127 128 128 def get_absolute_url(self): … … 262 262 user = models.ForeignKey(User) 263 263 message = models.TextField(_('message')) 264 264 265 def __ str__(self):265 def __unicode__(self): 266 266 return self.message 267 267 268 268 class AnonymousUser(object): … … 272 272 def __init__(self): 273 273 pass 274 274 275 def __ str__(self):276 return 'AnonymousUser'275 def __unicode__(self): 276 return u'AnonymousUser' 277 277 278 278 def __eq__(self, other): 279 279 return isinstance(other, self.__class__) -
django/contrib/flatpages/models.py
26 26 list_filter = ('sites',) 27 27 search_fields = ('url', 'title') 28 28 29 def __ str__(self):30 return "%s -- %s" % (self.url, self.title)29 def __unicode__(self): 30 return u"%s -- %s" % (self.url, self.title) 31 31 32 32 def get_absolute_url(self): 33 33 return self.url