README 3 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

7
 The project uses the following django and python modules:
8
    - django-request: https://github.com/kylef/django-request
chris's avatar
chris committed
9

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

chris's avatar
chris committed
15
16
Translation
===========
17

18
Create/update a translation file:
19

20
    # django-admin makemessages -l fr
21

22
Edit and translate the translation file:
23

24
    # gedit locale/fr/LC_MESSAGES/django.po
25

26
Compile translated messages:
27

28
    # django-admin compilemessages
29

chris's avatar
chris committed
30
31
Fast installation
=================
32

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

37
    # vi settings.py
38

chris's avatar
chris committed
39
Build nuages database
40

41
    # ./manage.py syncdb
42

43
Start the python webserver
44

45
    # ./manage.py runserver
46

47
You should have the application running at 127.0.0.1:8000
48

chris's avatar
chris committed
49
50
Apache installation
===================
51

52
53
54
55
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
56

57
    # vi settings.py
58

chris's avatar
chris committed
59
Build nuages database
60

61
62
    # ./manage.py sql sondage
    # ./manage.py syncdb
63

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

67
    <VirtualHost 62.58.109.156:80>
68
69
      
      ServerName nuage.domainepublic.net
70

71
72
      Alias /static/ /var/www/nuage/static/
      Alias /media/ /var/www/nuage/media/
73

74
      WSGIScriptAlias / /home/chris/django/nuage/apache/django.wsgi
75

76
    </VirtualHost>
77

78
79
Adapt the path in file apache/nuages.wsgi

80
Move the static files and link the media files
81

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

85
Fix permission for apache user
86

87
88
    sudo chown www-data nuage/nuage.sqlite
    sudo chown www-data nuage
89

chris's avatar
chris committed
90
91
Installing lenny django package on squeeze 
==========================================
92

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

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

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
117
118