Django

Code

Changeset 3122

Show
Ignore:
Timestamp:
06/12/06 11:20:05 (2 years ago)
Author:
adrian
Message:

Fixed #2139 -- Changed Redirect repr to str

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/redirects/models.py

    r2809 r3122  
    99    new_path = models.CharField(_('redirect to'), maxlength=200, blank=True, 
    1010        help_text=_("This can be either an absolute path (as above) or a full URL starting with 'http://'.")) 
     11 
    1112    class Meta: 
    1213        verbose_name = _('redirect') 
     
    1516        unique_together=(('site', 'old_path'),) 
    1617        ordering = ('old_path',) 
     18 
    1719    class Admin: 
    1820        list_filter = ('site',) 
    1921        search_fields = ('old_path', 'new_path') 
    2022 
    21     def __repr__(self): 
     23    def __str__(self): 
    2224        return "%s ---> %s" % (self.old_path, self.new_path)