Commit b8426344 authored by pi's avatar pi

release candidate

parent 3e0c0ec1
......@@ -84,6 +84,13 @@ For each of those files create a symbolic link between /etc/uwsgi/apps-enabled a
sudo ln -s /etc/wsgi/apps-available/´$FILE_NAME$´ /etc/wsgi/apps-enabled/´$FILE_NAME$´
Install RabbitMQ
.. code:: bash
sudo apt-get install rabbitmq-server
Optional : force static IP adress
......@@ -23,6 +23,9 @@ The database name ($NAME$), user ($USER$), password ($PASSWORD$) must be identic
sudo nano /etc/postgresql/9.1/main/postgresql.conf
listen_addresses = '*'
sudo nano /etc/postgresql/9.1/main/pg_hba.conf
# Database administrative login by Unix domain socket
local all postgresql md5
# IPv4 local connections:
host all all md5
# for the raspberry pi
......@@ -31,4 +34,7 @@ The database name ($NAME$), user ($USER$), password ($PASSWORD$) must be identic
host all all md5
sudo /etc/init.d/postgresql restart
How-to backup :
pg_dump -U $USER$ $NAME$ -f dump.sql
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.
......@@ -24,9 +24,9 @@ For each site replacing ´$REPANIER.BE$´ with the domain name of the correspond
chmod +x ~/
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/
Merge the folder /mysite of the git repo with the folder to ~/v1/mysite/mysite of your installation.
Copy the ´secret_key´ of ~/v1/mysite/mysite/ and check DB paramters into the file ~/v1/mysite/mysite/ The database name ($NAME$), user ($USER$), password ($PASSWORD$) must be identical to those in the setup of PostgreSQL.
Copy the ´secret_key´ of ~/v1/mysite/mysite/ and check DB paramters into the *.INI file loacted at /etc/uwsgi/apps-available/.
Generate a copy of static files needed by Django
......@@ -35,30 +35,31 @@ Generate a copy of static files needed by Django
cd ~/v1
source bin/activate
cd mysite
python collectstatic --settings=mysite.repanier_settings
python collectstatic --settings=ptidej.ptidej_settings
# If some errors execute
# python collectstatic --traceback --settings=mysite.repanier_settings
# python collectstatic --traceback --settings=ptidej.ptidej_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 syncdb --all --settings=mysite.repanier_settings
python schemamigration repanier --initial --settings=mysite.repanier_settings
python migrate --fake --settings=mysite.repanier_settings
python syncdb --all --settings=ptidej.ptidej_settings
python schemamigration repanier --initial --settings=ptidej.ptidej_settings
python migrate --fake --settings=ptidej.ptidej_settings
Check if CMS install is ok
.. code:: bash
python cms check --settings=mysite.repanier_settings
python cms check --settings=ptidej.ptidej_settings
Compile translation files
.. code:: bash
cd ~/v1/mysite/repanier
export DJANGO_SETTINGS_MODULE= compilemessages
......@@ -67,7 +68,7 @@ If you want, initialize the DB with test content : copy the content of /install/
.. code:: bash
cd ~/v1/mysite/
export DJANGO_SETTINGS_MODULE='mysite.repanier_settings'
export DJANGO_SETTINGS_MODULE='ptidej.ptidej_settings'
Finalize th configuration
......@@ -99,8 +100,8 @@ When needed, upgrade the DB with south for a new version of specific INSTALLED_A
.. code:: bash
cd ~/production/mysite/
python schemamigration repanier --auto --settings=mysite.repanier_settings
python migrate repanier --settings=mysite.repanier_settings
python schemamigration repanier --auto --settings=ptidej.ptidej_settings
python migrate repanier --settings=ptidej.ptidej_settings
If needed, check what South has done
if [ -z "$1" ]; then
echo "usage: $0 directory_of_the_new_virtualenv"
cd ~
sudo -k
sudo -l
mkdir $1
virtualenv $1
cd $1
source bin/activate
sudo apt-get install gettext unzip
sudo apt-get install libpq-dev python-dev python-setuptools
pip install psycopg2
# IF installing the latest stable version
# pip install django-cms
# ELSE installing the latest development version
# pip install
pip install -U
# ELSE installing a specific version
# pip install
pip install -U djangocms-text-ckeditor
# pip install -U djangocms-link
# pip install -U djangocms-snippet
# pip install -U djangocms-style
# pip install -U djangocms-column
# pip install -U djangocms-grid
# pip install -U djangocms-oembed
# pip install -U djangocms-table
# pip install -U djangocms-googlemap
# For easy_thumbnails which need Pillow (
sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms1-dev libwebp-dev tcl8.5-dev tk8.5-dev
pip install -U Pillow
pip install -U cmsplugin-filer
pip install -U django-reversion
pip install -U django_compressor
pip install -U django-admin-sortable2
pip install -U openpyxl
# pip install -U django-hvad
sudo apt-get install libxml2-dev libxslt1-dev
pip install -U docx
# pip install django_debug_toolbar
# pip install django-dajaxice ! not working with Django 1.6
# pip install django-custom-user
# pip install django-registration
pip install -U django-crispy-forms
pip install -U django-celery
if [ -z "$1" ]; then
echo "usage: $0 directory_of_the_new_virtualenv name_of_the_site"
cd ~
sudo -k
sudo -l
cd $1
source bin/activate
export DJANGO_SETTINGS_MODULE= startproject $2
cd ~/$1/$2/$2
mkdir media
mkdir collect-static
mkdir templates
# ----------------- Use compressor
cd ~/$1/$2/$2/collect-static
mkdir compressor
cd compressor
mkdir css
sudo chgrp www-data css
chmod g+w css
mkdir js
sudo chgrp www-data js
chmod g+w js
# ----------------- Use django cache
cd /var/tmp
mkdir django_cache
sudo chgrp www-data django_cache
chmod g+w django_cache
rm -rf /var/tmp/django_cache/*
# ----------------- Use django file session
cd /var/tmp
mkdir django_session
sudo chgrp www-data django_session
chmod g+w django_session
rm -rf /var/tmp/django_session/*
# ----------------- Config site folders
cd ~/$1/$2/$2/media
mkdir public
cd public
mkdir cms
mkdir cms_page_media
sudo chgrp www-data cms_page_media
chmod g+w cms_page_media
mkdir tmp
sudo chgrp www-data tmp
chmod g+w tmp
mkdir filer_public
sudo chgrp www-data filer_public
chmod g+w filer_public
mkdir filer_public_thumbnails
sudo chgrp www-data filer_public_thumbnails
chmod g+w filer_public_thumbnails
mkdir uploaded_pictures
sudo chgrp www-data uploaded_pictures
chmod g+w uploaded_pictures
cd ..
mkdir smedia
cd smedia
mkdir filer_private
sudo chgrp www-data filer_private
chmod g+w filer_private
mkdir filer_private_thumbnails
sudo chgrp www-data filer_private_thumbnails
chmod g+w filer_private_thumbnails
cd ~
This diff is collapsed.
if [ -z "$1" ]; then
echo "usage: $0 directory_of_the_new_virtualenv"
A_install_new_virtualenv $1
B_install_new_site $1 repanier
B_install_new_site $1 ptidej
B_install_new_site $1 apero
B_install_new_site $1 lelensois
B_install_new_site $1 lebio
B_install_new_site $1 claude
cd ~/$1
echo "#"
echo "# To be done manually :"
echo "# ---------------------"
echo "# Copy /mysite/* and subfolers to $1/mysite/mysite/*"
echo "# Copy /repanier/* and subfolders to $1/mysite/repanier/*"
echo cd ~/$1/mysite
echo python collectstatic --settings=mysite.repanier_settings
echo python syncdb --all --settings=mysite.repanier_settings
echo python schemamigration repanier --initial --settings=mysite.repanier_settings
echo python migrate --fake --settings=mysite.repanier_settings
echo "# Check if CMS is ok"
echo python cms check --settings=mysite.repanier_settings
echo "# Compile translation files"
echo cd ~/$1/mysite/repanier
echo compilemessages
echo cd ~/$1/mysite/mysite
echo compilemessages
echo export DJANGO_SETTINGS_MODULE='mysite.repanier_settings'
echo "# Initialize the DB with test content"
echo "# Copy /mysite/createdb/ and *.csv into ~/$1/mysite/"
echo cd ~/$1/mysite/
echo python
echo "#"
echo "# WHEN READY"
echo "# Restart the webserver"
echo sudo /etc/init.d/nginx restart
echo sudo /etc/init.d/uwsgi stop
echo rm -rf /var/tmp/django_cache/*
echo sudo /etc/init.d/uwsgi start
......@@ -7,14 +7,12 @@
processes = 2
buffer-size = 8192
from __future__ import absolute_import
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
body {
/* Margin bottom by footer height */
margin-bottom: 50px;
#footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 50px;
background-color: #f5f5f5;
/* Move down content because we have a fixed navbar that is 50px tall */
body {
padding-top: 60px;
padding-bottom: 20px;
/* automaticaly display menu on mouse over */
ul.nav li.dropdown:hover > ul.dropdown-menu {
display: block;
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-04 15:34+0100\n"
"POT-Creation-Date: 2014-03-12 18:14+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <>\n"
......@@ -18,91 +18,211 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
msgid "Homepage"
msgstr "Page d'accueil"
msgid "Secondary Page"
msgstr "Page interne"
msgid "French"
msgstr "Fançais"
msgid "Hero"
msgstr "Héro"
msgid "Column 1"
msgstr "Colonne 1"
msgid "Column 2"
msgstr "Colonne 2"
msgid "Column 3"
msgstr "Colonne 3"
msgid "Content"
msgstr "Contenu"
msgid "Dutch"
msgstr "Néerlandais"
msgid "info"
msgstr "info"
msgid "English"
msgstr "Anglais"
msgid "new"
msgstr "nouveau"
msgid "hint"
msgstr "atteindre"
msgid "normal"
msgstr "normal"
msgid "2x"
msgstr "2x"
msgid "3x"
msgstr "3x"
msgid "4x"
msgstr "4x"
#: templates/base.html:28
msgid "Skip to main content"
msgstr "Aller au contenu principal"
#: templates/base.html:43
msgid "Language"
msgstr "Langue"
#: templates/base.html:35
msgid "Toggle navigation"
msgstr "Basculer la navigation"
#: templates/base.html:51
#: templates/base.html:50
msgid "Welkom"
msgstr "Bienvenue"
#: templates/base.html:53
msgid "My profile"
msgstr "Mon profil"
#: templates/base.html:54
#: templates/base.html:52 templates/registration/logged_out.html:7
msgid "Logout"
msgstr "Deconnexion"
#: templates/base.html:59 templates/ templates/base.html:108
#: templates/base.html:57 templates/registration/login.html:7
#: templates/registration/login.html:32
msgid "Login"
msgstr "Connexion"
#: templates/base.html:100 templates/
#: templates/base.html:61
msgid "Language"
msgstr "Langue"
#: templates/base.html:78
msgid "Contact"
msgstr "Contact"
#: templates/base.html:78
msgid "Participer"
msgstr "Participer"
#: templates/password_reset/recovery_done.html:2
#: templates/password_reset/recovery_done.html:8
#: templates/password_reset/recovery_form.html:2
#: templates/password_reset/recovery_form.html:8
#: templates/password_reset/reset.html:2 templates/password_reset/reset.html:8
#: templates/password_reset/reset_sent.html:2
#: templates/password_reset/reset_sent.html:8
msgid "Password recovery"
msgstr "Réinitialisation du mot de passe"
#: templates/password_reset/recovery_done.html:11
msgid ""
"Your password has successfully been reset. You can use it right now on the "
"<a href=\"/go_repanier/\">login page</a>."
msgstr ""
"Votre mote de passe a été mis à jour. Vous pouvez vous <a href=\"/"
"go_repanier/\">connecter</a> dès à présent."
#: templates/password_reset/recovery_email.txt:1
#, python-format
msgid "Dear %(username)s,"
msgstr "Bonjour %(username)s,"
#: templates/password_reset/recovery_email.txt:3
#, python-format
msgid ""
"You -- or someone pretending to be you -- has requested a password reset on "
msgstr ""
"Vous -- ou quelqu'un se faisant passer pour vous -- a demandé de "
"réinitialiser votre mot de passe sur %(domain)s."
#: templates/password_reset/recovery_email.txt:5
msgid "You can set your new password by following this link:"
msgstr ""
"Vous pouvez réinitialiser votre mot de passe en cliquant sur le lien "
"suivant :"
#: templates/password_reset/recovery_email.txt:9
msgid ""
"If you don't want to reset your password, simply ignore this email and it "
"will stay unchanged."
msgstr ""
"Si vous souhaitez conserver votre mot de passe actuel, veuillez simplement "
"ignorer ce mail."
#: templates/password_reset/recovery_email_subject.txt:1
#, python-format
msgid "Password recovery on %(domain)s"
msgstr "Réinitialisation du mot de passe sur %(domain)s"
#: templates/password_reset/recovery_form.html:15
msgid "Username or Email"
msgstr "Nom d'utilisateur ou Email"
#: templates/password_reset/recovery_form.html:17
msgid "Recover my password"
msgstr "Réinitialiser mon mot de passe"
#: templates/password_reset/reset.html:12
#, python-format
msgid ""
"Sorry, this password reset link is invalid. You can still <a href="
"\"%(recovery_url)s\">request a new one</a>."
msgstr ""
"Votre demande de réinitialsation de mot de passe a expirée. Vous pouvez "
"toujours <a href=\"%(recovery_url)s\">introduire une nouvelle demande</a>."
#: templates/password_reset/reset.html:14
#, python-format
msgid "Hi, <strong>%(username)s</strong>. Please choose your new password."
msgstr ""
"Bonjour, <strong>%(username)s</strong>. Veuillez introduire votre nouveau "
"mot de passe."
#: templates/password_reset/reset.html:18
msgid "Set new password"
msgstr "Enregistrer le nouveau mot de passe"
#: templates/password_reset/reset_sent.html:11
#, python-format
msgid ""
"An email was sent to <strong>%(email)s</strong>. Use the link in it to set a "
"new password."
msgstr ""
"Un e-mail vient d'être envoyé à <strong>%(email)s</strong>. Veuillez "
"utiliser le lien qu'il contient pour réinitialiser votre mot de passe."
#: templates/registration/logged_out.html:10
msgid ""
"You are now disconnected. You can go right now on the <a href=\"/go_repanier/"
"\">login page</a> or on the <a href=\"/\">home page</a>."
msgstr ""
"Vous êtes maintenant déconnecté. Vous pouvez vous <a href=\"/go_repanier"
"\">re connecter</a> ou vous rendre à la <a href=\"/\">page d'accueil</a>."
#: templates/registration/login.html:16
msgid "Please correct the error below."
msgstr "Veuillez corriger l'erreur ci-dessous."
#: templates/registration/login.html:16
msgid "Please correct the errors below."
msgstr "Veuillez corriger les erreurs ci-dessous."
#: templates/registration/login.html:20 templates/registration/login.html:22
msgid "Username"
msgstr "Nom d'utilisateur"
#: templates/base.html:105 templates/
#: templates/registration/login.html:26 templates/registration/login.html:28
msgid "Password"
msgstr "Mot de passe"
#: templates/registration/login.html:33
msgid "Password lost"
msgstr "Mot de passe perdu ?"
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-04 15:34+0100\n"
"POT-Creation-Date: 2014-03-11 22:59+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <>\n"
......@@ -86,8 +86,8 @@ msgstr "Cliquer pour supprimer tous les %s choisis en même temps."
#: collect-static/admin/js/actions.min.js:1
msgid "%(sel)s of %(cnt)s selected"
msgid_plural "%(sel)s of %(cnt)s selected"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "%(sel)s parmi %(cnt)s sélectionné"
msgstr[1] "%(sel)s parmi %(cnt)s sélectionnés"
#: collect-static/admin/js/actions.js:109
#: collect-static/admin/js/actions.min.js:5
......@@ -188,6 +188,7 @@ msgstr "Hier"
msgid "Tomorrow"
msgstr "Demain"
#: collect-static/cms/js/modules/cms.changeform.js:60
#: collect-static/cms/js/plugins/cms.changeform.js:60
msgid "Are you sure you want to change tabs without saving the page first?"
msgstr "Etes-vous sur de changer d'onglet sans avoir d'abord sauvegardé?"
......@@ -2,10 +2,12 @@
from common_settings import *
### Site 3 specific parameters
SITE_ID = 3 if os.getenv('DJANGO_SETTINGS_MODULE_SITE_ID','') == '3' else 1 / 0
MEDIA_ROOT = os.path.join(PROJECT_DIR, "media", ALLOWED_HOSTS[0], "public")
MEDIA_ROOT = os.path.join(PROJECT_DIR, "media", "public")
os.path.join(PROJECT_DIR, "templates"),
......@@ -5,10 +5,10 @@
<title>Repanier | {% page_attribute "title" %}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
{% addtoblock "css" %}<link rel="stylesheet" href="{{ STATIC_URL}}foundation/css/normalize.css">{% endaddtoblock %}
{% addtoblock "css" %}<link rel="stylesheet" href="{{ STATIC_URL}}foundation/css/foundation.min.css">{% endaddtoblock %}
{% addtoblock "jshead" %}<script src="{{ STATIC_URL }}foundation/js/vendor/custom.modernizr.js"></script>{% endaddtoblock %}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% addtoblock "css" %}<link rel="stylesheet" href="{{ STATIC_URL}}bootstrap/css/bootstrap.min.css">{% endaddtoblock %}
{% addtoblock "css" %}<link rel="stylesheet" href="{{ STATIC_URL}}bootstrap/css/custom.css">{% endaddtoblock %}
{% addtoblock "css" %}
<style type="text/css">
......@@ -21,114 +21,69 @@
{% endaddtoblock %}
{% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %}
{% render_block "css" %}
{% render_block "jshead" %}
<a href="#content" class="skip_link">{% trans "Skip to main content" %}</a>
{% cms_toolbar %}
<!-- Header and Nav -->
<div class="fixed contain-to-grid">
<nav class="top-bar" data-topbar>
<ul class="title-area">
<!-- Title Area -->
<li class="name"></li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
<section class="top-bar-section">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">{% trans "Toggle navigation" %}</span>