Django: the Web framework for perfectionists with deadlines

lp:~theonion/django/makechild

Created by Tom X. Tobin on 2008-07-15 and last modified on 2008-08-16

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
Members of Onion Labs can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Onion Labs
Project:
Django
Status:
Development

Recent revisions

5068. By Tom X. Tobin on 2008-08-16

Add Model.get_ancestor()

5067. By Tom X. Tobin on 2008-08-16

Merge from trunk.

5066. By Tom X. Tobin on 2008-07-18

Merge from trunk.

5065. By Tom X. Tobin on 2008-07-17

Fix typo in Model.get_children

5064. By Tom X. Tobin on 2008-07-17

Merge from trunk.

5063. By Tom X. Tobin on 2008-07-17

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 on 2008-07-17

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 on 2008-07-17

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 on 2008-07-15

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 on 2008-07-14

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)
This branch contains Public information 
Everyone can see this information.

Subscribers