Serve static pages from templates
Project description
Serve flat pages from templates. Advantages:
No database hits
Keep your pages in a version control system
Installation
Install the latest release with pip:
pip install django-sfp
Configuration
Add sfp to your INSTALLED_APPS.
Add sfp.middleware.SfpFallbackMiddleware to your MIDDLEWARE settings.
Create a pages template directory. This should be a subdirectory of one of the templates in your TEMPLATES setting. Any templates you include here (except for a base.html) will get served as a static page.
For example, assuming your project-level template directory is named “templates”, then:
The url /about/ will render templates/pages/about.html
The url /about/team/ will render templates/pages/about/team.html
Settings
To serve pages/index.html as homepage use this setting:
SFP_HANDLE_HOMEPAGE = True
Edit pages online
To edit pages at runtime you can use django-dirtyedit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.