feincms/feincms — pull request #434 by guetux (2013-06-27 15:15:25+00:00)
Title: Allow content type filtering by templates

This is a suggestion to fix #403. It adds the ability to restrict a content type to a subset of templates. This happens by passing a list list of template keys to ``create_content_type``::

Page.create_content_type(RawContent, templates=('base',), regions=('main',))

It works for me and is comes with tests, but i'd really appreciate someone to test this in a real world scenario before merging it. It was only tested within the example project so far.

Also, there is no explicit limitation to add a content type to different templates of regions as discussed in #403. However, I don't consider this a huge weakness as this filtering thing is used mostly to help backend users not to add content types where they don't make sense.