def get_all_child_relations(model):
return [<EOL>field for field in model._meta.get_fields()<EOL>if isinstance(field.remote_field, ParentalKey)<EOL>]<EOL>
Return a list of RelatedObject records for child relations of the given model,
including ones attached to ancestors of the model