localwiki/localwiki — Issue #156: Add flatpages to localwiki
Author: mivanov
Created: 2011-12-30 23:16:43+00:00
State: open

Since we've had to do this a couple of times already, should just add it in so it's there by default.

The main question is: how will people use them?

Usually, I believe, people just want to add some little thing in the middle of a regular wiki page. This is best accomplished by using the embed plugin, so for that we'd want to provide a bare flatpages template with nothing on it.

If they want to create an entire special page that has the look of a normal localwiki page, then we can provide a template that looks right. And just a a couple of things because it's not actually a wiki page: won't appear in All Pages, won't autocomplete in the link dialog, and links to it will look broken?

To enable the flatpages app, do the following:

1) Add 'django.contrib.flatpages' to the INSTALLED_APPS setting.
2) Add 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' to the MIDDLEWARE_CLASSES setting.
3) Create two templates: "flatpages/default.html", which extends site/base.html, and "flatpages/bare.html" which just has the title and an empty

to allow embedding small things.