README 3.77 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
8
 The project uses the following django applications:
    - django-registration: https://bitbucket.org/ubernostrum/django-registration
9
    - django-request: https://github.com/kylef/django-request
chris's avatar
chris committed
10

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

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

19
Create/update a translation file:
20

21
    # django-admin makemessages -l fr
22

23
Edit and translate the translation file:
24

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

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

Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
29
    # make translation
30

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

34
35
36
37
38
39
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
40
You can have local customizations in the local_settings.py file (and avoid modify the original settings.py)
41

42
    # vi local_settings.py
43

chris's avatar
chris committed
44
Build nuages database
45

46
    # ./manage.py syncdb
47

48
Start the python webserver
49

50
    # ./manage.py runserver
51

52
You should have the application running at http://127.0.0.1:8000
53

chris's avatar
chris committed
54
55
Apache installation
===================
56

57
58
59
60
61
62
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
63
You can have local customizations in the local_settings.py file. Optionally set DEBUG option to False.
64

Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
65
    # vi local_settings.py
66

chris's avatar
chris committed
67
Build nuages database
68

69
    # cd /usr/local/lib/nuages
70
    # ./manage.py syncdb
71
    # ./manage.py collectstatic
72

73
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
74

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

81
82
83
84
      <Directory /usr/local/lib/nuages/apache>
              Order allow,deny
              Allow from all
      </Directory>
85

86
87
88
89
      <Directory /usr/local/lib/nuages/staticroot>
        Order deny,allow
        Allow from all
      </Directory>
90

91
    </VirtualHost>
92

93
Adapt the path in file apache/django.wsgi
94

Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
95
Set permission for apache user
96

97
    sudo chown -R www-data /usr/local/lib/nuages
98

99
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
100

101
102
103
104
105
106
107
108
109
110
111
112
113
114
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
115
116
117
118
119
120
121
122
123
Update
======

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

  # make update

Migration
=========
124
125
126
127
128
129
130
131
132
133

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

  # mkdir fixture
  # ./manage.py dumpdata sondage --indent=2 > fixture/sondage.json
  # ./manage.py dumpdata accounts --indent=2 > fixture/accounts.json
  # git pull
  # ./manage.py reset sondage accounts
  # ./manage.py syncdb
  # ./manage.py loaddata < fixture/*.json
Christophe Siraut's avatar
Cleanup    
Christophe Siraut committed
134