root / docs / source / index.rst @ 89269d68
History | View | Annotate | Download (6.8 kB)
1 |
.. snf-cloudcms documentation master file, created by |
---|---|
2 |
sphinx-quickstart on Wed Feb 22 18:07:30 2012. |
3 |
You can adapt this file completely to your liking, but it should at least |
4 |
contain the root `toctree` directive. |
5 |
|
6 |
Welcome to snf-cloudcms's documentation! |
7 |
======================================== |
8 |
|
9 |
Introduction |
10 |
============ |
11 |
|
12 |
snf-cloudcms is a cms application based on `django`_ and `feincms`_. |
13 |
|
14 |
The project created to power websites that provide information about the |
15 |
`cloud services`_ deployed by `GRNET`_. |
16 |
|
17 |
At the current state the application provides the following features: |
18 |
|
19 |
* basic cms funcionality (adding/removing/editing hierarchical pages) |
20 |
* blog application |
21 |
* FAQ application |
22 |
* Resources application (for presentations, technical papers etc.) |
23 |
|
24 |
.. _django: http://www.djangoproject.com |
25 |
.. _feincms: http://feinheit.ch/media/labs/feincms/ |
26 |
.. _cloud services: http://docs.dev.grnet.gr/ |
27 |
.. _GRNET: http://www.grnet.gr/ |
28 |
|
29 |
|
30 |
Installation |
31 |
============ |
32 |
|
33 |
Using debian packages |
34 |
--------------------- |
35 |
|
36 |
Although not required it is recommended to use `snf-webproject`_ to deploy the |
37 |
cms application. If you want to deploy using your custom django project take |
38 |
a look on ``cloudcms/synnefo_settings.py`` where `snf-webproject` hooks are |
39 |
defined to find which django settings are required for cms to work. |
40 |
|
41 |
.. _snf-webproject: http://docs.dev.grnet.gr/snf-webproject |
42 |
|
43 |
Install required packages:: |
44 |
|
45 |
apt-get install snf-common snf-webproject |
46 |
apt-get install python-django-feincms python-django-pagination python-django |
47 |
|
48 |
.. note:: |
49 |
|
50 |
``python-django-feincms`` and ``python-django-pagination`` are not provided |
51 |
currently on debian stable but can be backported from sid. |
52 |
|
53 |
then, install ``snf-cloudcms`` package:: |
54 |
|
55 |
apt-get install snf-cloudcms |
56 |
|
57 |
Change settings in ``/etc/synnefo/20-snf-cloudcms-*.conf`` to match your |
58 |
deployment needs. |
59 |
|
60 |
|
61 |
Deployment |
62 |
========== |
63 |
|
64 |
For information on how to configure and initialize database and serve |
65 |
``snf-cloudcms`` static files please refer to `snf-webproject`_ documentation. |
66 |
|
67 |
.. note:: |
68 |
|
69 |
``snf-cloudcms`` won't work with ``snf-webproject < 0.9.0`` |
70 |
|
71 |
|
72 |
``snf-cloudcms`` uses the django sites framework so that multiple cms sites |
73 |
can be deployed from the same django project and share common content. For each |
74 |
service site you want to deploy you should set the appropriate |
75 |
``CLOUDCMS_SITE_ID`` environmental variable to match the site id added in your |
76 |
cms databse. |
77 |
|
78 |
A quick way to initialize the sites you want to deploy is to create a simple |
79 |
fixtures file ``mysites.json`` containing the following:: |
80 |
|
81 |
[ |
82 |
{ |
83 |
"pk": 1, |
84 |
"model": "sites.site", |
85 |
"fields": { |
86 |
"domain": "okeanos.grnet.gr", |
87 |
"name": "okeanos.grnet.gr" |
88 |
} |
89 |
}, |
90 |
] |
91 |
|
92 |
and load the fixtures in your db using:: |
93 |
|
94 |
snf-manage loaddata ./mysites.json |
95 |
|
96 |
After that you can deploy each of the sites you included in the above fixtures |
97 |
file using your prefered deployment method (fcgi, gunicorn etc.). |
98 |
|
99 |
e.g. using django internal http server:: |
100 |
|
101 |
export CLOUDCMS_SITE_ID=1 |
102 |
snf-manage runserver |
103 |
|
104 |
If you skipped superuser creation as prompted on your database initialization |
105 |
step, you should create one now:: |
106 |
|
107 |
snf-manage createsuperuser |
108 |
|
109 |
Now you will be able to login using the superuser credentials you provided on |
110 |
the above command on ``http://<deployment-domain>/cmsmanage/`` url and start |
111 |
editing the content of your cms. |
112 |
|
113 |
|
114 |
Static files |
115 |
------------ |
116 |
|
117 |
snf-cloudcms requires the following static files to be served by your django |
118 |
project: |
119 |
|
120 |
* feincms static files for the admin interface |
121 |
* django.contrib.admin static files |
122 |
* snf-cloudcms static files |
123 |
|
124 |
If you are using `snf-webproject`_ to deploy your cms all static file handlers |
125 |
should be taken care for you and no additional steps required in the deployment |
126 |
process. This automatic behaviour can be enabled/disabled from the |
127 |
``WEBPROJECT_SERVE_STATIC`` setting. |
128 |
|
129 |
If you want to disable serving static files from your django project, set |
130 |
``WEBPROJECT_SERVE_STATIC`` to False in your settings and configure your |
131 |
web server to serve static files of the following locations to the specific |
132 |
urls which can be altered in your settings files: |
133 |
|
134 |
* <feincms install dir>/feincms/static/ -> FEINCMS_ADMIN_MEDIA (default:/static/feincms/) |
135 |
* <django install dir>/django/contrib/admin/media/ -> ADMIN_MEDIA_PREFIX (default:/static/djangoadminmedia/) |
136 |
* <cloudcms install dir>/cloudcms/static/ -> MEDIA_URL (default:/static/) |
137 |
|
138 |
|
139 |
CMS uploads |
140 |
----------- |
141 |
|
142 |
snf-cloudcms uses feincms medialibrary application to store and display |
143 |
files in cms pages. The location of those files is based on MEDIA_ROOT setting |
144 |
and is calculated using the following expression:: |
145 |
|
146 |
MEDIA_ROOT + '/medialibrary/' |
147 |
|
148 |
if you deploy using `snf-webproject`_ this defaults to |
149 |
``/usr/share/synnefo/static/medialibrary`` which you should create and grant |
150 |
appropriate permissions for web app to be able to access it. e.g. if you deploy |
151 |
using nginx/gunicorn and your gunicorn workers run with www-data user |
152 |
permissions:: |
153 |
|
154 |
mkdir /usr/share/synnefo/static/medialibrary |
155 |
chown www-data:www-data /usr/share/synnefo/static/medialibrary |
156 |
chmod o+rw /usr/share/synnefo/sattic/medialibrary |
157 |
|
158 |
|
159 |
Admin guide |
160 |
=========== |
161 |
|
162 |
Bind blog to a cms page |
163 |
----------------------- |
164 |
|
165 |
1. Create a page on the cms tree. |
166 |
2. On the region you want the blog content to appear (list of posts, and post |
167 |
details), add an ``Application content`` content type and choose ``Cloud |
168 |
blog`` from the drop down list. |
169 |
3. On navigation extension settings of the page, choose ``blog categories``. |
170 |
|
171 |
Bind FAQs to a cms page |
172 |
------------------------ |
173 |
|
174 |
1. Create a page on the cms tree. |
175 |
2. On the region you want the blog content to appear (list of posts, and post |
176 |
details), add an ``Application content`` content type and choose ``Cloud |
177 |
FAQ`` from the drop down list. |
178 |
3. *Optional:* On navigation extension settings of the page, choose |
179 |
``faq categories``. |
180 |
|
181 |
Bind resources to a cms page |
182 |
---------------------------- |
183 |
|
184 |
1. Create a page on the cms tree. |
185 |
2. On the region you want the resources to appear append a ``Resources list`` |
186 |
content type. |
187 |
|
188 |
|
189 |
FAQ's guide |
190 |
----------- |
191 |
|
192 |
Adding a question |
193 |
^^^^^^^^^^^^^^^^^ |
194 |
|
195 |
1. Open the faq's list in admin panel (``/cmsmanage/cloudcmsfaq/question/``) |
196 |
and press the ``Add faq`` button. |
197 |
2. Fill in the required fields: |
198 |
* Title, the question. |
199 |
* Author, the question author. |
200 |
* Slug, the url to be used for the current question |
201 |
(should get autocompleted after filling the title field) |
202 |
* Category, the category of the question. |
203 |
|
204 |
3. On the main content area tab add the content you want to be displayed as the |
205 |
answer of the question. |
206 |
* ``Rich text`` (can be added by pressing the icon with the pencil) and |
207 |
``Raw content`` may contain html text. |
208 |
|
209 |
4. Click save. |
210 |
|
211 |
|
212 |
.. include:: ../../Changelog |
213 |
|
214 |
Indices and tables |
215 |
================== |
216 |
|
217 |
* :ref:`genindex` |
218 |
* :ref:`modindex` |
219 |
* :ref:`search` |
220 |
|