Gestion de contenu
Go to file
Frédéric Péters 84a7d1e2b4 translation update 2016-10-11 15:49:32 +02:00
combo translation update 2016-10-11 15:49:32 +02:00
data/themes/gadjo publik: mark header as being for breadcrumbs (#12888) 2016-08-29 10:25:22 +02:00
debian debian: only reload when init script is called for reloading (#11396) 2016-06-18 11:03:09 +02:00
tests general: add support for varying cell template based on slug (#7141) 2016-09-30 15:16:40 +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 build: add missing usersearch statics and templates in MANIFEST.in 2016-04-06 19:31:48 +02:00
README general: simplify acquisition of parent content (#11110) 2016-06-02 16:09:08 +02:00
jenkins.sh jenkins: get older version of django-jsonfield 2016-06-02 16:34:00 +02:00
manage.py django-admin.py startproject combo 2014-12-07 14:59:41 +01:00
requirements.txt bump eopayment dependency 2016-08-23 08:11:39 +02:00
setup.py bump eopayment dependency 2016-08-23 08:11:39 +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 way a cell of "same as parent" type will automatically be added.


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/>.


Combo embeds some other pieces of code, with their own authors and copyright
notices:

Gauge.js
  Files: combo/apps/dataviz/static/js/gauge.min.js
  License: MIT
  Comment:
   From http://bernii.github.io/gauge.js/