doc: add 'architecture' and 'settings' sections to the README file
This commit is contained in:
parent
4453710bd5
commit
ef752fecb8
53
README
53
README
|
@ -16,6 +16,59 @@ It's then required to get the database configured (./manage.py syncdb); by
|
|||
default it will create a db.sqlite3 file.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
|
|
Loading…
Reference in New Issue