Ticket #1496: compare-users.diff
File compare-users.diff, 1.1 KB (added by , 19 years ago) |
---|
-
django/contrib/auth/middleware.py
17 17 def __getattr__(self, name): 18 18 return getattr(self._user, name) 19 19 20 def __eq__(self, other): 21 return self._get_user() == other 22 23 def __eq__(self, other): 24 return self._get_user() != other 25 20 26 class AuthenticationMiddleware: 21 27 def process_request(self, request): 22 28 from django.contrib.auth.models import SESSION_KEY -
django/contrib/auth/models.py
214 214 raise SiteProfileNotAvailable 215 215 return self._profile_cache 216 216 217 def __eq__(self, other): 218 return self.id == other.id 219 220 def __ne__(self, other): 221 return self.id != other.id 222 217 223 class Message(models.Model): 218 224 user = models.ForeignKey(User) 219 225 message = models.TextField(_('Message'))