Commit 076ab9cb authored by Christophe Siraut's avatar Christophe Siraut
Browse files

Update installation instruction. Thanks to Joan!

parent e4f49f7d
......@@ -4,7 +4,8 @@ Nuages - Easy poll sharing
Nuages aims to provide a collaborative meeting poll system, similar to doodle or rdvz. It is build in python, using the django framework and a little of javascript. This application was named after Django's famous song. Feedback and collaboration are welcome at nuage@ domainepublic.net
The project uses the following django and python modules:
The project uses the following django applications:
- django-registration: https://bitbucket.org/ubernostrum/django-registration
- django-request: https://github.com/kylef/django-request
The project uses the following javascripts:
......@@ -30,9 +31,13 @@ Compile translated messages:
Fast installation
=================
Install python-django package
Extract the nuages archive somewhere in your home folder
Edit project setings (optional)
Install python-django package (>=1.3)
Clone nuages archive somewhere in your home folder
# cd
# git clone http://git.domainepublic.net/git/nuages.git
Optionally edit project setings
# vi settings.py
......@@ -44,75 +49,51 @@ Start the python webserver
# ./manage.py runserver
You should have the application running at 127.0.0.1:8000
You should have the application running at http://127.0.0.1:8000
Apache installation
===================
Install python-django package (<1.2)
Extract the archive somewhere in your home folder
Move the "static" folder on tha apache side.
Edit project setings, set DEBUG option to False, and change MEDIA_ROOT
Install python-django package (>=1.3)
Copy nuages to /usr/local/lib/nuages
# cd /usr/local/lib
# git clone http://git.domainepublic.net/git/nuages.git
Optionally edit project setings and set DEBUG option to False
# cd /usr/local/lib/nuages
# vi settings.py
Build nuages database
# ./manage.py sql sondage
# cd /usr/local/lib/nuages
# ./manage.py syncdb
# ./manage.py collectstatic
There are several ways to configure Apache and python,
we try wsgi, simply install libapache2-mod-wsgi, adapt and add the following to /etc/apache2/sites-available/nuage
There are several ways to configure Apache and python, we recommend wsgi, simply install libapache2-mod-wsgi, and add the following to /etc/apache2/sites-available/nuages
<VirtualHost 62.58.109.156:80>
<VirtualHost *:80>
ServerName nuage.domainepublic.net
ServerName localhost.locadomain
Alias /static/ /usr/local/lib/nuages/staticroot/
WSGIScriptAlias / /usr/local/lib/nuages/apache/django.wsgi
Alias /static/ /var/www/nuage/static/
Alias /media/ /var/www/nuage/media/
<Directory /usr/local/lib/nuages/apache>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias / /home/chris/django/nuage/apache/django.wsgi
<Directory /usr/local/lib/nuages/staticroot>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Adapt the path in file apache/nuages.wsgi
Move the static files and link the media files
mv static /var/www/nuage/
ln -s /usr/share/python-support/python-django/django/contrib/admin/media/ /var/www/nuage/
Adapt the path in file apache/django.wsgi
Fix permission for apache user
sudo chown www-data nuage/nuage.sqlite
sudo chown www-data nuage
Installing lenny django package on squeeze
==========================================
Remove any installed python-django package (1.2)
Install backport lenny python-django (1.1)
Add the following to /etc/apt/preferences
Package: python-django
Pin: version 1.1*
Pin-Priority: 1001
Build log
=========
django-admin startproject nuage
cd nuage; BAZ=$(pwd)
gedit settings.py urls.py
./manage.py startapp sondage
cd sondage; gedit models.py forms.py views.py
cd $BAZ; ./manage.py startapp userbase
cd userbase; gedit views.py
cd $BAZ; mkdir templates static
# rm nuage.sqlite ; ./manage.py sql sondage ; ./manage.py syncdb
sudo chown -R www-data /usr/local/lib/nuages
import os
import sys
sys.path.append('/home/chris/django/nuages')
sys.path.append('/usr/local/lib/nuages')
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
......
......@@ -65,7 +65,7 @@ MEDIA_URL = ''
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = STATIC_ROOT = os.path.join(PROJECT_DIR, 'staticroot')
STATIC_ROOT = os.path.join(PROJECT_DIR, 'staticroot')
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
......@@ -88,7 +88,7 @@ STATICFILES_FINDERS = (
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'secret'
SECRET_KEY = '3qm&amp;@6264-=st16)7_xa*ds+31e0mqqs@+*!ud7gzt$tq!b^qn'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
......@@ -129,7 +129,3 @@ INSTALLED_APPS = (
'request',
'registration'
)
LOGIN_URL = '/user/login/'
LOGIN_REDIRECT_URL = '/'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment