README 3.12 KB
Newer Older
1

chris's avatar
chris committed
2
3
Nuages - Easy poll sharing
==========================
4

chris's avatar
chris committed
5
 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
6

chris's avatar
chris committed
7
8
9
 The project uses the following django modules:
    - django-urlauth: http://bitbucket.org/lorien/django-urlauth/
    - django-account: http://bitbucket.org/lorien/django-account/
10
    - django-request: https://github.com/kylef/django-request
chris's avatar
chris committed
11

chris's avatar
chris committed
12
13
14
 The project uses the following javascripts:
    - jquery, jquery-ui: http://www.jquery.com/
    - jquery-dynamic-formset: http://code.google.com/p/django-dynamic-formset/
15
    - jquery timepicker addon: https://github.com/trentrichardson/jQuery-Timepicker-Addon
16

chris's avatar
chris committed
17
18
Translation
===========
19

20
Create/update a translation file:
21

22
    # django-admin makemessages -l fr
23

24
Edit and translate the translation file:
25

26
    # gedit locale/fr/LC_MESSAGES/django.po
27

28
Compile translated messages:
29

30
    # django-admin compilemessages
31

chris's avatar
chris committed
32
33
Fast installation
=================
34

35
Install python-django package (<1.2)
chris's avatar
chris committed
36
Extract the nuages archive somewhere in your home folder
37
Edit project setings (optional)
38

39
    # vi settings.py
40

chris's avatar
chris committed
41
Build nuages database
42

43
    # ./manage.py syncdb
44

45
Start the python webserver
46

47
    # ./manage.py runserver
48

49
You should have the application running at 127.0.0.1:8000
50

chris's avatar
chris committed
51
52
Apache installation
===================
53

54
55
56
57
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
58

59
    # vi settings.py
60

chris's avatar
chris committed
61
Build nuages database
62

63
64
    # ./manage.py sql sondage
    # ./manage.py syncdb
65

66
There are several ways to configure Apache and python,
67
 we try wsgi, simply install libapache2-mod-wsgi, adapt and add the following to /etc/apache2/sites-available/nuage
68

69
    <VirtualHost 62.58.109.156:80>
70
71
      
      ServerName nuage.domainepublic.net
72

73
74
      Alias /static/ /var/www/nuage/static/
      Alias /media/ /var/www/nuage/media/
75

76
      WSGIScriptAlias / /home/chris/django/nuage/apache/django.wsgi
77

78
    </VirtualHost>
79

80
81
Adapt the path in file apache/nuages.wsgi

82
Move the static files and link the media files
83

84
85
    mv static /var/www/nuage/
    ln -s /usr/share/python-support/python-django/django/contrib/admin/media/ /var/www/nuage/
86

87
Fix permission for apache user
88

89
90
    sudo chown www-data nuage/nuage.sqlite
    sudo chown www-data nuage
91

chris's avatar
chris committed
92
93
Installing lenny django package on squeeze 
==========================================
94

95
Remove any installed python-django package (1.2)
chris's avatar
chris committed
96
Install backport lenny python-django (1.1)
97
98
Add the following to /etc/apt/preferences
    Package: python-django
chris's avatar
chris committed
99
    Pin: version 1.1*
100
101
    Pin-Priority: 1001

chris's avatar
chris committed
102
103
Build log
=========
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

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
119
120