Changeset 3924
- Timestamp:
- 10/24/06 11:42:03 (2 years ago)
- Files:
-
- django/trunk/django/contrib/auth/models.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/contrib/auth/models.py
r3885 r3924 127 127 "Always returns False. This is a way of comparing User objects to anonymous users." 128 128 return False 129 129 130 130 def is_authenticated(self): 131 131 """Always return True. This is a way to tell if the user has been authenticated in templates. … … 271 271 return 'AnonymousUser' 272 272 273 def __eq__(self, other): 274 return isinstance(other, self.__class__) 275 276 def __ne__(self, other): 277 return not self.__eq__(other) 278 279 def __hash__(self): 280 return 1 # instances always return the same hash value 281 273 282 def save(self): 274 283 raise NotImplementedError … … 302 311 def is_anonymous(self): 303 312 return True 304 313 305 314 def is_authenticated(self): 306 315 return False
