armstrong/armstrong.core.arm_sections — pull request #10 by joncotton (2012-01-12 00:00:40+00:00)
Title: more flexible find_related() backend

This does not change existing functionality -- Section.items() behaves as it always did. Having a targetModel however gives us the ability to generically search for specific subclass model instances.

Use case assuming a typical Content->Article,Image,Video subclassed Model structure:
* Section.items will grab every Content item.
* If you only want to grab Articles, call Section.limited_items(Article)
* One problem with grabbing every Content item is you may `render_model` templatetag instances that don't have or need a requested template. On a Section page you may only want to render Articles while ignoring Image and Video.