# django-fluent-pages **Repository Path**: mirrors_adamchainz/django-fluent-pages ## Basic Information - **Project Name**: django-fluent-pages - **Description**: A flexible, scalable CMS with custom node types, and flexible block content. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2025-12-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README .. image:: https://travis-ci.org/edoburu/django-fluent-pages.png?branch=master :target: http://travis-ci.org/edoburu/django-fluent-pages :alt: build-status django-fluent-pages =================== This is a stand-alone module, which provides a flexible, scalable CMS with custom node types, and flexible block content. Features: * A fully customizable page hierarchy. * Support for multilingual websites. * Support for multiple websites in a single database. * Fast SEO-friendly page URLs. * SEO optimized (meta keywords, description, title, 301-redirects, sitemaps integration). * Plugin support for custom page types, which: * Integrate application logic in page trees. * Integrate advanced block editing (via as django-fluent-contents_). For more details, see the documentation_ at Read The Docs. Page tree customization ----------------------- This module provides a page tree, where each node type can be a different model. This allows developers like yourself to structure your site tree as you see fit. For example: * Build a tree structure of RST pages, by defining a ``RstPage`` type. * Build a tree with widget-based pages, by integrating django-fluent-contents_. * Build a "product page", which exposes all products as sub nodes. * Build a tree of a *homepage*, *subsection*, and *article* node, each with custom fields like professional CMSes have. Each node type can have it's own custom fields, attributes and rendering. In case you're building a custom CMS, this module might just be suited for you, since it provides the tree for you, without bothering with anything else. The actual page contents is defined via page type plugins. Installation ============ First install the module, preferably in a virtual environment:: git clone https://github.com/edoburu/django-fluent-pages.git cd django-fluent-pages pip install . The main dependency is django-polymorphic-tree_, which is based on django-mptt_ and django-polymorphic_. These dependencies will be automatically installed. Configuration ------------- Next, create a project which uses the CMS:: cd .. django-admin.py startproject fluentdemo To have a standard setup with django-fluent-contents_ integrated, use:: INSTALLED_APPS += ( # The CMS apps 'fluent_pages', # Required dependencies 'mptt', 'parler', 'polymorphic', 'polymorphic_tree', 'slug_preview', # Optional widget pages via django-fluent-contents 'fluent_pages.pagetypes.fluentpage', 'fluent_contents', 'fluent_contents.plugins.text', 'django_wysiwyg', # Optional other CMS page types 'fluent_pages.pagetypes.redirectnode', # enable the admin 'django.contrib.admin', ) DJANGO_WYSIWYG_FLAVOR = "yui_advanced" Note each CMS application is optional. Only ``fluent_pages`` and ``mptt`` are required. The remaining apps add additional functionality to the system. In ``urls.py``:: urlpatterns += patterns('', url(r'', include('fluent_pages.urls')) ) The database can be created afterwards:: ./manage.py syncdb ./manage.py runserver Custom page types ----------------- The key feature of this module is the support for custom node types. Take a look in the existing types at ``fluent_pages.pagetypes`` to see how it's being done. It boils down to creating a package with 2 files: The ``models.py`` file should define the custom node type, and any fields it has:: from django.db import models from django.utils.translation import ugettext_lazy as _ from fluent_pages.models import HtmlPage from mysite.settings import RST_TEMPLATE_CHOICES class RstPage(HtmlPage): """ A page that renders RST code. """ rst_content = models.TextField(_("RST contents")) template = models.CharField(_("Template"), max_length=200, choices=RST_TEMPLATE_CHOICES) class Meta: verbose_name = _("RST page") verbose_name_plural = _("RST pages") A ``page_type_plugins.py`` file that defines the metadata, and rendering:: from fluent_pages.extensions import PageTypePlugin, page_type_pool from .models import RstPage @page_type_pool.register class RstPagePlugin(PageTypePlugin): model = RstPage sort_priority = 10 def get_render_template(self, request, rstpage, **kwargs): return rstpage.template A template could look like:: {% extends "base.html" %} {% load markup %} {% block headtitle %}{{ page.title }}{% endblock %} {% block main %}