A flat pages application for Django based on django.contrib.flatpages
Django Páginas is a pluggable flat pages application for Django Web Framework based on django.contrib.flatpages.
- Project page
Installing & Setup
- Install django-paginas (available on PyPI, so you can install it running pip install django-paginas);
- Add paginas to your INSTALLED_APPS setting;
Add an entry in your URLconf. For example:
urlpatterns = patterns('', ('^pages/', include('paginas.urls')), )
- Add 'paginas.middleware.PageFallbackMiddleware' to your MIDDLEWARE_CLASSES setting ;
- Run the command manage.py syncdb --migrate.
- PAGINAS_DEFAULT_TEMPLATE_ID (Default: 1)
- Automatically select the correspondent template on Page creation.
Django Redator is Software Libre; you can redistribute it and/or modify it under the terms of the BSD (3-clause) License.
You should have received a copy of the BSD License along with this program; see the file LICENSE.
|||Generally, you can put PageFallbackMiddleware at the end of the list. This means it will run first when processing the response, and ensures that any other response-processing middlewares see the real flatpage response rather than the 404.|