SimonSapin/Flask-FlatPages — pull request #29 by xi (2014-05-12 22:55:25+00:00)
Title: subclassing API

While working on a project using Flask-FlatPages I found myself wanting to exclude some pages (e.g. because they had metadata like `published: false` or `date: 2040-03-12`). I also wanted to normalize the metadata (e.g. allowing both `category` and `categories`).

My approach for implementing this was to subclass `FlatPages`. I guess this might be a common usecase so providing default hooks for this kind of functionality seemd like a good idea. So now I added to methods `_is_excluded` and `_process` that do nothing by default but can be overwritten by subclasses.

However, there is an issues with this: Because both methods are private they are not included in the autogenerated documentation.