Changes between Version 7 and Version 8 of RemovingTheMagic
- Timestamp:
- Dec 7, 2005, 11:14:34 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RemovingTheMagic
v7 v8 97 97 }}} 98 98 99 == API usage: Overrid ding model methods (and pre- and post-save hooks) ==99 == API usage: Overriding model methods (and pre- and post-save hooks) == 100 100 101 101 Proper subclassing of methods will now work, so you can subclass the automatic {{{save()}}} and {{{delete()}}} methods. This removes the need for the {{{_pre_save()}}} and {{{_post_save()}}} hooks. Example: … … 129 129 }}} 130 130 131 == API usage: Overrid ding table-level functions ==131 == API usage: Overriding table-level functions == 132 132 133 133 You can override any table-level functions, such as {{{get_list()}}} or {{{get_object()}}}. Do this by creating a custom {{{models.Manager}}} subclass and passing it to your model. The term "manager" could be replaced with some other word.