README 3.82 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 application:
8
    - django-registration: https://bitbucket.org/ubernostrum/django-registration
9
10
11

  On debian they can be installed as follow:

12
    # aptitude install python-django-registration
chris's avatar
chris committed
13

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

chris's avatar
chris committed
19
20
Translation
===========
21

22
Create/update a translation file:
23

24
    # django-admin makemessages -l fr
25

26
Edit and translate the translation file:
27

Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
28
    # vi locale/fr/LC_MESSAGES/django.po
29

Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
30
Compile translated messages/update a translation file:
31

Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
32
    # make translation
33

chris's avatar
chris committed
34
35
Fast installation
=================
36

37
38
39
40
41
42
Install python-django package (>=1.3)
Clone nuages archive somewhere in your home folder

    # cd
    # git clone http://git.domainepublic.net/git/nuages.git

Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
43
You can have local customizations in the local_settings.py file (and avoid modify the original settings.py)
44

45
    # vi local_settings.py
46

chris's avatar
chris committed
47
Build nuages database
48

49
    # ./manage.py syncdb
50

51
Start the python webserver
52

53
    # ./manage.py runserver
54

55
You should have the application running at http://127.0.0.1:8000
56

chris's avatar
chris committed
57
58
Apache installation
===================
59

60
61
62
63
64
65
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 

Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
66
You can have local customizations in the local_settings.py file. Optionally set DEBUG option to False.
67

Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
68
    # vi local_settings.py
69

chris's avatar
chris committed
70
Build nuages database
71

72
    # cd /usr/local/lib/nuages
73
    # ./manage.py syncdb
74
    # ./manage.py collectstatic
75

76
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
77

78
    <VirtualHost *:80>
79
      
80
81
82
      ServerName localhost.locadomain
      Alias /static/ /usr/local/lib/nuages/staticroot/
      WSGIScriptAlias / /usr/local/lib/nuages/apache/django.wsgi
83

84
85
86
87
      <Directory /usr/local/lib/nuages/apache>
              Order allow,deny
              Allow from all
      </Directory>
88

89
90
91
92
      <Directory /usr/local/lib/nuages/staticroot>
        Order deny,allow
        Allow from all
      </Directory>
93

94
    </VirtualHost>
95

96
Adapt the path in file apache/django.wsgi
97

Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
98
Set permission for apache user
99

100
    sudo chown -R www-data /usr/local/lib/nuages
101

102
Set domain name: login to /admin/sites/site/1/ and modify the entry from "example.com" to your domain name.
Christophe Siraut's avatar
Christophe Siraut committed
103

104
105
106
107
108
109
110
111
112
113
114
115
116
117
Email Service
=============

Django is expecting a working SMTP server listening at localhost, sendmail for instance.

Another option is to add attributes in settings.py, this make email work only when there is a localhost server accepting all the email. To change this and make it configurable, we only have to add these lines:

  # Email attributes
  EMAIL_HOST = 'mail.example.com'
  EMAIL_PORT = '25'
  EMAIL_HOST_USER = 'username@example.com'
  EMAIL_HOST_PASSWORD = 'password'
  EMAIL_USE_TLS = False

Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
118
119
120
121
122
123
124
125
126
Update
======

In order to update your nuages installation, you can issue:

  # make update

Migration
=========
127
128
129
130

When models change, we need to perform some manual steps to keep existing data:

  # mkdir fixture
131
  # ./manage.py dumpdata meetingpoll --indent=2 > fixture/meetingpoll.json
132
133
  # ./manage.py dumpdata accounts --indent=2 > fixture/accounts.json
  # git pull
134
  # ./manage.py reset meetingpoll accounts
135
136
  # ./manage.py syncdb
  # ./manage.py loaddata < fixture/*.json
Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
137