summaryrefslogtreecommitdiff
path: root/docs/source/install.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/source/install.rst')
-rw-r--r--docs/source/install.rst99
1 files changed, 50 insertions, 49 deletions
diff --git a/docs/source/install.rst b/docs/source/install.rst
index 1defe38..a48bb35 100644
--- a/docs/source/install.rst
+++ b/docs/source/install.rst
@@ -22,7 +22,7 @@ Requirements
- `python-markdown <http://sourceforge.net/projects/python-markdown/>`_
- - `django <http://www.djangoproject.com/>`_ version 1.2
+ - `django <http://www.djangoproject.com/>`_ version 1.4
- `django-south <http://south.aeracode.org/>`_ version 0.7
@@ -32,7 +32,7 @@ Requirements
The simple way to obtain theses elements is to get package from your favourite linux distribution.
-For instance the packages for Debian squeeze are get with::
+For instance the packages for Debian wheezy are get with::
$ sudo apt-get install python python-django python-django-south
$ sudo apt-get install python-markdown gettext apache2
@@ -47,7 +47,7 @@ Choose an install path
First of all you have to choose an install path::
- $ INSTALL_PATH=/var/local/django/
+ INSTALL_PATH=/var/local/django/
Of course you have to create it if it doesn't exist.
@@ -58,31 +58,32 @@ The last "stable" version is available in this `directory <http://www.peacefrogs
Another solution is to get it from the git repository::
- $ cd $INSTALL_PATH
- $ git clone git://www.peacefrogs.net/git/papillon
- $ cd papillon
- $ git tag -l # list tagged versions
- $ git checkout v0.3 # checkout the desired version
+ cd $INSTALL_PATH
+ git clone git://www.peacefrogs.net/git/papillon
+ cd papillon
+ git tag -l # list tagged versions
+ git checkout v0.3.1 # checkout the desired version
Install the sources
-------------------
If necessary unpack then move the sources in a directory readable to the apache user (www-data in Debian)::
- $ cd $INSTALL_PATH
- $ sudo tar xvjf /home/etienne/papillon-last.tar.bz2
- $ cd papillon
- $ sudo chown -R etienne:www-data papillon
+ cd $INSTALL_PATH
+ sudo tar xvjf /home/etienne/papillon-last.tar.bz2
+ cd papillon
+ sudo chown -R etienne:www-data papillon
-In your Papillon application directory create settings.py to fit to your configuration.
-A base template is provided (settings.py.tpl). The main parameters to change are pointed here::
+In your Papillon application directory copy **local_settings.py.sample** to **local_settings.py**.
+There is juste a few parameters to give.::
+
+ cd $INSTALL_PATH
+ cd papillon/papillon
+ PAPILLON_PATH=`pwd`
+ cp local_settings.py.sample local_settings.py
+ vim local_settings.py
- $ cd $INSTALL_PATH
- $ cd papillon/papillon
- $ PAPILLON_PATH=`pwd`
- $ cp settings.py.tpl settings.py
- $ nano settings.py
####
EXTRA_URL = '' # extra_url path
@@ -92,7 +93,7 @@ A base template is provided (settings.py.tpl). The main parameters to change are
(...)
DATABASES = {
'default': {
- 'ENGINE': 'sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+ 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'papillon', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
@@ -111,42 +112,42 @@ If your Papillon is going to be used by many people, it is recommanded to use a
In the directory Papillon, put up a symbolic link to the basic styles django (change the path depending on your installation of django)::
- $ cd $PAPILLON_PATH
- $ ln -s .
+ cd $PAPILLON_PATH
+ ln -s /usr/share/pyshared/django/contrib/admin/static/admin/ static/
Database initialisation
-----------------------
In the directory Papillon simply::
- $ cd $PAPILLON_PATH
- $ ./manage.py syncdb
+ cd $PAPILLON_PATH
+ ./manage.py syncdb
Answer the questions to create an administrator (administration pages can be found at: http://where_is_papillon/admin) then::
- $ cd $PAPILLON_PATH
- $ ./manage.py migrate polls
+ cd $PAPILLON_PATH
+ ./manage.py migrate polls
If you use sqlite (default database) give the write rights on the database file to the apache user::
- $ cd $PAPILLON_PATH
- $ chmod g+w papillon.db
- $ chmod g+w .
+ cd $PAPILLON_PATH
+ chmod g+w papillon.db
+ chmod g+w .
Compiling languages
-------------------
If your language is available in the locale directory of Papillon, you will just need to get it compiled. Still being in the Papillon directory, this can be done with (here, "de" stands for german. Replace it with the appropriate language code)::
- $ cd $PAPILLON_PATH
- $ django-admin compilemessages -l de
+ cd $PAPILLON_PATH
+ django-admin compilemessages -l de
If your language is not available, feel free to create the default po files and to submit it, contributions are well appreciated. Procedure is as follows.
You first need to create the default po file (of course, replace "de" according to the language you chose to create)::
- $ cd $PAPILLON_PATH
- $ django-admin makemessages -l de
+ cd $PAPILLON_PATH
+ django-admin makemessages -l de
There should now be a django.po file in locale/de/LC_MESSAGES. Complete it with your translation.
@@ -176,43 +177,43 @@ Install with mod_python
Install mod_python for apache::
- $ sudo apt-get install libapache2-mod-python
+ sudo apt-get install libapache2-mod-python
Copy and adapt the choosen configuration file for Papillon::
- $ cd $INSTALL_PATH
- $ sudo cp papillon/docs/conf/apache-modpython.conf /etc/apache2/sites-available/papillon
- $ sudo nano /etc/apache2/sites-available/papillon
+ cd $INSTALL_PATH
+ sudo cp papillon/docs/conf/apache-modpython.conf /etc/apache2/sites-available/papillon
+ sudo nano /etc/apache2/sites-available/papillon
Active this site, reload Apache and now your Papillon "can fly"::
- $ sudo a2ensite papillon
- $ sudo /etc/init.d/apache2 reload
+ sudo a2ensite papillon
+ sudo /etc/init.d/apache2 reload
Install with mod_wsgi
+++++++++++++++++++++++
Install mod_wsgi for apache::
- $ sudo apt-get install libapache2-mod-wsgi
+ sudo apt-get install libapache2-mod-wsgi
Copy and adapt the apache configuration file for Papillon::
- $ cd $INSTALL_PATH
- $ sudo cp docs/conf/apache-wsgi.conf /etc/apache2/sites-available/papillon
- $ sudo nano /etc/apache2/sites-available/papillon
+ cd $INSTALL_PATH
+ sudo cp docs/conf/apache-wsgi.conf /etc/apache2/sites-available/papillon
+ sudo nano /etc/apache2/sites-available/papillon
Copy and adapt the wsgi configuration file for Papillon::
- $ cd $INSTALL_PATH
- $ sudo mkdir apache
- $ sudo cp docs/conf/django.wsgi apache/
- $ sudo nano apache2/django.wsgi
+ cd $INSTALL_PATH
+ sudo mkdir apache
+ sudo cp docs/conf/django.wsgi apache/
+ sudo nano apache2/django.wsgi
Active this site, reload Apache and now your Papillon "can fly" (with WSGI wings)::
- $ sudo a2ensite papillon
- $ sudo /etc/init.d/apache2 reload
+ sudo a2ensite papillon
+ sudo /etc/init.d/apache2 reload
Post-installation