Commit 742d217a authored by Patrick Colmant's avatar Patrick Colmant

New release

parent e1b14d4f
----------------------------
How to setup debian (wheezy)
----------------------------
- raspberrypi, using raspbian 'wheezy' (http://www.raspberrypi.org/downloads)
- virtualbox, using debian 'wheezy' (http://cdimage.debian.org/cdimage/weekly-builds/i386/iso-cd/debian-testing-i386-netinst.iso)
Add 'sudo' on the Debian OS (not on the Raspian)
------------------------------------------------
This step has not to be done on the Raspberry Pi Raspbian because it's already automaticaly done during the first Raspbian installation.
Login as : root
.. code:: bash
sudo apt-get update
sudo apt-get install sudo
nano /etc/sudoers
# User privilege specification
root ALL=(ALL:ALL) ALL
pi ALL=(ALL:ALL) ALL
exit
From now, don't log you anymore as ´root´. Log you as ´pi´
Update the Debian OS
--------------------
Login as : pi
.. code:: bash
sudo apt-get update && sudo apt-get -y upgrade
Install Virtualenv, Nginx, Uwsgi
--------------------------------
.. code:: bash
sudo apt-get install python-virtualenv
Install Nginx
-------------
.. code:: bash
sudo apt-get install nginx
Copy install/nginx/nginx.conf to /etc/nginx using sudo.
.. code:: bash
sudo cp nginx.conf /etc/nginx/nginx.conf
For each sites, create a copy of install/nginx/sites-available/example. Replace ´$REPANIER.BE$´ with the domain name of the corresponding site and ´$FAVICON_FILE_NAME$.ico´ with the name of the corresponding favicon file and ´/$PATH_TO$/´ with the path of your home directory. You can get it using ´cd ~´ then ´pwd´. Usualy this path is ´home/pi´ for the Raspberry Pi. Copy the resulting files to /etc/nginx/sites-available using sudo.
.. code:: bash
sudo cp * /etc/nginx/sites-available/
For each of those files create a symbolic link between /etc/nginx/sites-enabled and /etc/nginx/sites-available.
.. code:: bash
sudo ln -s /etc/nginx/sites-available/´$FILE_NAME$´ /etc/nginx/sites-enabled/´$FILE_NAME$´
Install Uwsgi
-------------
.. code:: bash
sudo apt-get install uwsgi uwsgi-plugin-python
For each sites, create a copy of install/uwsgi/sites-available/example.ini. Replace ´$REPANIER.BE$´ with the domain name of the corresponding site and ´/$PATH_TO$/´ with the path of your home directory. You can get it using ´cd ~´ then ´pwd´. Usualy this path is ´home/pi´ for the Raspberry Pi. Copy the resulting files to /etc/uwsgi/apps-available using sudo.
.. code:: bash
sudo cp *.ini /etc/uwsgi/apps-available/
For each of those files create a symbolic link between /etc/uwsgi/apps-enabled and /etc/uwsgi/apps-available.
.. code:: bash
sudo ln -s /etc/wsgi/apps-available/´$FILE_NAME$´ /etc/wsgi/apps-enabled/´$FILE_NAME$´
Optional : force static IP adress
---------------------------------
This step is usefull to force the Raspberry Pi to use a static IP adress so that you can easily access to it with a ssh client. Don't forget to activate ´ssh client´ during the first Raspbian installation. If this has not be done, run ´raspi-config´again to fix it.
My BBOX IP is 192.168.1.1. The static IP is 192.168.1.100.
.. code:: bash
sudo nano /etc/network/interfaces
auto lo
iface lo inet loopback
# iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.100
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
-----------------------
How to setup PostgreSQL
-----------------------
- raspberrypi, using raspbian 'wheezy'
- virtualbox, using debian 'wheezy'
Install PostgreSQL
------------------
The database name ($NAME$), user ($USER$), password ($PASSWORD$) must be identical to those in the django settings file ´mysite/production_settings.py´
.. code:: bash
sudo apt-get install postgresql
sudo -u postgres psql
CREATE USER $USER$ PASSWORD '$PASSWORD$';
ALTER ROLE $USER$ WITH CREATEDB;
CREATE DATABASE $NAME$ OWNER $USER$;
CREATE USER test_$USER$ PASSWORD '$PASSWORD$';
ALTER ROLE test_$USER$ WITH CREATEDB;
\q
sudo nano /etc/postgresql/9.1/main/postgresql.conf
listen_addresses = '*'
sudo nano /etc/postgresql/9.1/main/pg_hba.conf
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# for the raspberry pi
host all all 192.168.1.0/24 md5
# for the virtualbox
host all all 10.0.2.0/24 md5
sudo /etc/init.d/postgresql restart
Now you got access to the PosgreSQL DB from any PC connected to the same network as the Raspberry Pi via "pgadmin" if you have installed it on your PC.
------------------------------------------
How to setup Django, Django-cms - Repanier
------------------------------------------
- raspberrypi, using raspbian 'wheezy'
- virtualbox, using debian 'wheezy'
Install Django, Django-cms
--------------------------
Copy /install/install_new_virtualenv.sh and install_new_site.sh to your home directory.
.. code:: bash
chmod +x ~/install_new_virtualenv.sh
chmod +x ~/install_new_site.sh
~/install_new_virtualenv.sh v1
For each site replacing ´$REPANIER.BE$´ with the domain name of the corresponding site execute install_new_site.sh.
.. code:: bash
chmod +x ~/install_new_site.sh
~/install_new_site.sh v1 $REPANIER.BE$
Merge the folder /mysite of the git repo with the folder to ~/v1/mysite/mysite of your installation. Copy the folder /repanier of the git repo to ~/v1/mysite, giving ~/v1/mysite/repanier.... Copy your favicon.ico to ~/v1/mysite/mysite/media/
Copy the ´secret_key´ of ~/v1/mysite/mysite/setup.py and check DB paramters into the file ~/v1/mysite/mysite/production_settings.py. The database name ($NAME$), user ($USER$), password ($PASSWORD$) must be identical to those in the setup of PostgreSQL.
Generate a copy of static files needed by Django
.. code:: bash
cd ~/v1
source bin/activate
cd mysite
python manage.py collectstatic --settings=mysite.repanier_settings
# If some errors execute
# python manage.py collectstatic --traceback --settings=mysite.repanier_settings
# to detect the root cause
Create the DB with south. During this step you will be asked to create the ´superuser´ of Django.
.. code:: bash
python manage.py syncdb --all --settings=mysite.repanier_settings
python manage.py schemamigration repanier --initial --settings=mysite.repanier_settings
python manage.py migrate --fake --settings=mysite.repanier_settings
Check if CMS install is ok
.. code:: bash
python manage.py cms check --settings=mysite.repanier_settings
Compile translation files
.. code:: bash
cd ~/v1/mysite/repanier
django-admin.py compilemessages
If you want, initialize the DB with test content : copy the content of /install/createdb into ~/v1/mysite/
.. code:: bash
cd ~/v1/mysite/
export DJANGO_SETTINGS_MODULE='mysite.repanier_settings'
python createdb.py
Finalize th configuration
.. code:: bash
cd ~
ln -s ~/v1 ~/production
Restart Nginx and Uwsgi
.. code:: bash
# Restart Nginx
sudo /etc/init.d/nginx restart
# Stop Uwsgi
sudo /etc/init.d/uwsgi stop
# Clean the Django cache
rm -rf /var/tmp/django_cache/*
# Start Uwsgi
sudo /etc/init.d/uwsgi start
The surf on your sites
When needed, upgrade the DB with south for a new version of specific INSTALLED_APPS (eg repanier)
-------------------------------------------------------------------------------------------------
.. code:: bash
cd ~/production/mysite/
python manage.py schemamigration repanier --auto --settings=mysite.ptidej_settings
python manage.py migrate repanier --settings=mysite.ptidej_settings
If needed, check what South has done
.. code:: bash
cd ~/production/mysite/
python manage.py migrate --list --settings=mysite.ptidej_settings
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'af', {
label: 'Styl',
panelTitle: 'Opmaak style',
panelTitle1: 'Blok style',
panelTitle2: 'Inlyn style',
panelTitle3: 'Objek style'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'ar', {
label: 'أنماط',
panelTitle: 'Formatting Styles', // MISSING
panelTitle1: 'أنماط الفقرة',
panelTitle2: 'أنماط مضمنة',
panelTitle3: 'أنماط الكائن'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'bg', {
label: 'Стилове',
panelTitle: 'Formatting Styles', // MISSING
panelTitle1: 'Block Styles', // MISSING
panelTitle2: 'Inline Styles', // MISSING
panelTitle3: 'Object Styles' // MISSING
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'bn', {
label: 'স্টাইল',
panelTitle: 'Formatting Styles', // MISSING
panelTitle1: 'Block Styles', // MISSING
panelTitle2: 'Inline Styles', // MISSING
panelTitle3: 'Object Styles' // MISSING
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'bs', {
label: 'Stil',
panelTitle: 'Formatting Styles', // MISSING
panelTitle1: 'Block Styles', // MISSING
panelTitle2: 'Inline Styles', // MISSING
panelTitle3: 'Object Styles' // MISSING
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'ca', {
label: 'Estil',
panelTitle: 'Estils de format',
panelTitle1: 'Estils de bloc',
panelTitle2: 'Estils incrustats',
panelTitle3: 'Estils d\'objecte'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'cs', {
label: 'Styl',
panelTitle: 'Formátovací styly',
panelTitle1: 'Blokové styly',
panelTitle2: 'Řádkové styly',
panelTitle3: 'Objektové styly'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'cy', {
label: 'Arddulliau',
panelTitle: 'Arddulliau Fformatio',
panelTitle1: 'Arddulliau Bloc',
panelTitle2: 'Arddulliau Mewnol',
panelTitle3: 'Arddulliau Gwrthrych'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'da', {
label: 'Typografi',
panelTitle: 'Formattering på stylesheet',
panelTitle1: 'Block typografi',
panelTitle2: 'Inline typografi',
panelTitle3: 'Object typografi'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'de', {
label: 'Stil',
panelTitle: 'Formatierungenstil',
panelTitle1: 'Block Stilart',
panelTitle2: 'Inline Stilart',
panelTitle3: 'Objekt Stilart'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'el', {
label: 'Μορφές',
panelTitle: 'Στυλ Μορφοποίησης',
panelTitle1: 'Στυλ Κομματιών',
panelTitle2: 'Στυλ Εν Σειρά',
panelTitle3: 'Στυλ Αντικειμένων'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'en-au', {
label: 'Styles',
panelTitle: 'Formatting Styles', // MISSING
panelTitle1: 'Block Styles',
panelTitle2: 'Inline Styles',
panelTitle3: 'Object Styles'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'en-ca', {
label: 'Styles',
panelTitle: 'Formatting Styles', // MISSING
panelTitle1: 'Block Styles',
panelTitle2: 'Inline Styles',
panelTitle3: 'Object Styles'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'en-gb', {
label: 'Styles',
panelTitle: 'Formatting Styles',
panelTitle1: 'Block Styles',
panelTitle2: 'Inline Styles',
panelTitle3: 'Object Styles'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'en', {
label: 'Styles',
panelTitle: 'Formatting Styles',
panelTitle1: 'Block Styles',
panelTitle2: 'Inline Styles',
panelTitle3: 'Object Styles'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'eo', {
label: 'Stiloj',
panelTitle: 'Stiloj pri enpaĝigo',
panelTitle1: 'Stiloj de blokoj',
panelTitle2: 'Enliniaj Stiloj',
panelTitle3: 'Stiloj de objektoj'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'es', {
label: 'Estilo',
panelTitle: 'Estilos para formatear',
panelTitle1: 'Estilos de párrafo',
panelTitle2: 'Estilos de carácter',
panelTitle3: 'Estilos de objeto'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'et', {
label: 'Stiil',
panelTitle: 'Vormindusstiilid',
panelTitle1: 'Blokkstiilid',
panelTitle2: 'Reasisesed stiilid',
panelTitle3: 'Objektistiilid'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'eu', {
label: 'Estiloa',
panelTitle: 'Formatting Styles', // MISSING
panelTitle1: 'Bloke Estiloak',
panelTitle2: 'Inline Estiloak',
panelTitle3: 'Objektu Estiloak'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'fa', {
label: 'سبک',
panelTitle: 'سبکهای قالببندی',
panelTitle1: 'سبکهای بلوک',
panelTitle2: 'سبکهای درونخطی',
panelTitle3: 'سبکهای شیء'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'fi', {
label: 'Tyyli',
panelTitle: 'Muotoilujen tyylit',
panelTitle1: 'Lohkojen tyylit',
panelTitle2: 'Rivinsisäiset tyylit',
panelTitle3: 'Objektien tyylit'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'fo', {
label: 'Typografi',
panelTitle: 'Formatterings stílir',
panelTitle1: 'Blokk stílir',
panelTitle2: 'Inline stílir',
panelTitle3: 'Object stílir'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'fr-ca', {
label: 'Styles',
panelTitle: 'Styles de formattage',
panelTitle1: 'Styles de block',
panelTitle2: 'Styles en ligne',
panelTitle3: 'Styles d\'objet'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'fr', {
label: 'Styles',
panelTitle: 'Styles de mise en page',
panelTitle1: 'Styles de blocs',
panelTitle2: 'Styles en ligne',
panelTitle3: 'Styles d\'objet'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'gl', {
label: 'Estilo',
panelTitle: 'Formatting Styles', // MISSING
panelTitle1: 'Block Styles', // MISSING
panelTitle2: 'Inline Styles', // MISSING
panelTitle3: 'Object Styles' // MISSING
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'gu', {
label: 'શૈલી/રીત',
panelTitle: 'ફોર્મેટ ',
panelTitle1: 'બ્લોક ',
panelTitle2: 'ઈનલાઈન ',
panelTitle3: 'ઓબ્જેક્ટ પદ્ધતિ'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'he', {
label: 'סגנון',
panelTitle: 'סגנונות פורמט',
panelTitle1: 'סגנונות בלוק',
panelTitle2: 'סגנונות רצף',
panelTitle3: 'סגנונות אובייקט'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'hi', {
label: 'स्टाइल',
panelTitle: 'Formatting Styles', // MISSING
panelTitle1: 'Block Styles', // MISSING
panelTitle2: 'Inline Styles', // MISSING
panelTitle3: 'Object Styles' // MISSING
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'hr', {
label: 'Stil',
panelTitle: 'Stilovi formatiranja',
panelTitle1: 'Block stilovi',
panelTitle2: 'Inline stilovi',
panelTitle3: 'Object stilovi'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'hu', {
label: 'Stílus',
panelTitle: 'Formázási stílusok',
panelTitle1: 'Blokk stílusok',
panelTitle2: 'Inline stílusok',
panelTitle3: 'Objektum stílusok'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'is', {
label: 'Stílflokkur',
panelTitle: 'Formatting Styles', // MISSING
panelTitle1: 'Block Styles', // MISSING
panelTitle2: 'Inline Styles', // MISSING
panelTitle3: 'Object Styles' // MISSING
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'it', {
label: 'Stile',
panelTitle: 'Stili di formattazione',
panelTitle1: 'Stili per blocchi',
panelTitle2: 'Stili in linea',
panelTitle3: 'Stili per oggetti'
});
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'stylescombo', 'ja', {
label: 'スタイル',