Ticket #4839: urlresolvers_repr.diff
File urlresolvers_repr.diff, 978 bytes (added by , 17 years ago) |
---|
-
django/core/urlresolvers.py
144 144 self.default_args = default_args or {} 145 145 self.name = name 146 146 147 def __repr__(self): 148 return '<%s %s %s>' % ( 149 self.__class__.__name__, self.name, self.regex.pattern) 150 151 147 152 def add_prefix(self, prefix): 148 153 """ 149 154 Adds the prefix string to a string-based callback. … … 205 210 self.default_kwargs = default_kwargs or {} 206 211 self._reverse_dict = {} 207 212 213 def __repr__(self): 214 return '<%s %s %s>' % ( 215 self.__class__.__name__, self.urlconf_name, self.regex.pattern) 216 217 208 218 def _get_reverse_dict(self): 209 219 if not self._reverse_dict and hasattr(self.urlconf_module, 'urlpatterns'): 210 220 for pattern in reversed(self.urlconf_module.urlpatterns):