Changes between Version 29 and Version 30 of RemovingTheMagic
- Timestamp:
- Jan 6, 2006, 4:26:11 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RemovingTheMagic
v29 v30 135 135 }}} 136 136 137 == Multiple managers ==137 == Custom managers, and multiple managers == 138 138 139 139 '''Status: Done''' … … 207 207 }}} 208 208 209 If a manager needs to access its associated class, it should use {{{self.klass}}}. Example: 210 211 {{{ 212 #!python 213 class PersonManager(models.Manager): 214 def get_fun_person(self): 215 try: 216 return self.get_object(fun__exact=True) 217 except self.klass.DoesNotExist: 218 print "Doesn't exist." 219 }}} 220 209 221 == Renamed !DoesNotExist exception == 210 222