Gestion de contenu
Go to file
Serghei Mihai e026739491 family: improve template to be easily customizable via css (#8125)
French translations also updated
2015-09-23 19:47:03 +02:00
combo family: improve template to be easily customizable via css (#8125) 2015-09-23 19:47:03 +02:00
data/themes/gadjo gadjo: add progressive rendering of publik menu (#7996) 2015-09-17 14:35:27 +02:00
debian misc: add a rss/atom feed cell (#6842) 2015-08-24 17:17:06 +02:00
tests data: add support for Media class to CellBase (fixes #8293) 2015-09-18 12:25:31 +02:00
.gitignore add .gitignore 2014-12-07 15:05:54 +01:00
COPYING add license file 2014-12-07 15:01:15 +01:00
MANIFEST.in family: include app templates 2015-09-21 18:35:33 +02:00
README doc: mention manage.py migrate and runserver 2015-07-01 19:15:50 +02:00
manage.py django-admin.py startproject combo 2014-12-07 14:59:41 +01:00
requirements.txt build: limit django-ckeditor version to <4.5.3 (#8180) 2015-09-07 09:51:16 +02:00
setup.py setup.py: add requests to dependencies (fixes #8294) 2015-09-18 12:26:03 +02:00

README

Combo
=====

Combo is a simple content management system, tailored to create simple
websites, and with a specialization in aggregating contents from different
sources.

Installation
------------

Dependencies can be installed with pip,

 $ pip install -r requirements.txt

It's then required to get the database configured (./manage.py migrate); by
default it will create a db.sqlite3 file.

You can then run the Django test server for a quick try (you should refer to
the Django documentation for production deployments).

 $ ./manage.py runserver


Architecture
------------

Combo manages content as a series of pages (objects of type 'Page'), that can
be sorted ('order' attribute) and hierarchically ordered ('parent' attribute).

Every pages have a title and a "slug", that is used as the page URL; a page
with 'index' as its slug will be served as the index page of the site.

The pages are set to use a template; the templates are defined in the settings
file (COMBO_PUBLIC_TEMPLATES) and are made of a name, a template file, and a
serie of "placeholders", identifying locations in the page (main content, side
bar, footer...).

Example:

    'standard': {
        'name': 'Standard',
        'template': 'combo/page_template.html',
        'placeholders': {
            'content': {
                'name': 'Content',
            },
            'footer': {
                'name': 'Footer',
                'acquired': True,
            },
        }
    }

The content of a page is defined as a serie of cells, of which there are
various types (they are all subclasses of CellBase); each cell is also
associated with a placeholder ('placeholder' attribute) and its order within
('order' attribute).

A placeholder can be marked as 'acquired' (see "footer" in the example above),
this makes its cells automatically inherited from a parent page; the presence
of a cell of type 'Unlock Marker' will stop this acquisition mechanism, this
makes it possible to have a different content for those placeholders in
specific pages or sections have the site.

  Note: in the case of placeholder acquisition the site index page will be
  inserted as the top of the page hierarchy.


Settings
--------

Default settings are loaded from settings.py, they can be overloaded by a
local_settings.py file set in the same directory, or by a file referenced
in the COMBO_SETTINGS_FILE environment variable.

SAML authentication can be enabled by adding 'mellon' to INSTALLED_APPS and
'mellon.backends.SAMLBackend' to AUTHENTICATION_BACKENDS, this requires
django-mellon to be installed, and further files and settings are required:

 - public and private keys (in cert.pem and key.cert in the current working
   directory, or from files defined in the MELLON_PUBLIC_KEYS and
   MELLON_PRIVATE_KEY settings)
 - metadata of the identity provider (in idp-metadata.xml, or defined using
   the MELLON_IDENTITY_PROVIDERS settings)

Details on these options and additional SAML settings are available in the
documentation of django-mellon.


Blurps (from cmsplugin-blurp module) can be used to define additional cell
types, the CMS_PLUGIN_BLURP_RENDERERS variable is used to hold them, details
can be found in the cmsplugin-blurp documentation.

In addition to common attributes Combo supports a 'private' attribute, that can
be used to exclude the given blurp from selectable cells.  The blurp itself can
still be referenced manually in a template file. This is useful to avoid
overwhelming the UI with blurps used in non-editable parts of the pages.


Tests
-----

Unit tests are written using py.test, and its pytest-django support library.

  DJANGO_SETTINGS_MODULE=combo.settings COMBO_SETTINGS_FILE=tests/settings.py py.test

Tests for w.c.s. cells do require access to the wcsctl script, its location has
to be given in a WCSCTL environment variable, this give a full command line:

  WCSCTL=$(pwd)/wcs/wcsctl.py \
  DJANGO_SETTINGS_MODULE=combo.settings COMBO_SETTINGS_FILE=tests/settings.py py.test


License
-------

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
details.

You should have received a copy of the GNU Affero General Public License along
with this program.  If not, see <http://www.gnu.org/licenses/>.