lp:~theonion/django/makechild
Adds support to Django's multi-table inheritance for creating child instances out of existing parent instances, removing child instances without removing parents, and querying information regarding parents and children.
- Get this branch:
- bzr branch lp:~theonion/django/makechild
Branch merges
Branch information
Recent revisions
- 5063. By Tom X. Tobin
-
Multi-table inheritance: add methods to Options to query parent/child classes.
Options grows the following methods: get_parent_models,
get_parent_model_by_ name, get_child_models, get_child_ model_by_ name get_parent_models is fairly similar to get_parent_list, except that it doesn't
traverse ancestors; folding these together may be appropriate at some point. - 5062. By Tom X. Tobin
-
Multi-table inheritance: add get_parents and get_children methods to Model.
These return the parent and children instances of the model instance. Child
instances will only be returned for children that already exist. - 5061. By Tom X. Tobin
-
Multi-table inheritance: allow deleting children while retaining parents.
Model.delete() now takes a new optional argument, "parents"; if false, only the
child model is deleted (i.e., parents/ancestors are retained). - 5060. By Tom X. Tobin
-
Multi-table inheritance: add support for creating children of existing parents.
This is via two new methods on QuerySet (and proxies on Manager):
prepare_child() and create_child(); see their docstrings for details. - 5059. By russellm
-
Removed a Python2.3 incompatible generator construct. Thanks to Karen Tracey for the report.
Branch metadata
- Branch format:
- Branch format 6
- Repository format:
- Bazaar pack repository format 1 (needs bzr 0.92)