README 3.83 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
Christophe Siraut committed
28
    # vi locale/fr/LC_MESSAGES/django.po
29

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

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

34 35
Dev 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
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
Christophe Siraut committed
66
You can have local customizations in the local_settings.py file. Optionally set DEBUG option to False.
67

68
    # vi /usr/local/lib/nuages/nuages/local_settings.py
69

70
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, replacing ServerName accordingly.
71

72
    <VirtualHost *:80>
73
      
74 75
      ServerName localhost.locadomain
      Alias /static/ /usr/local/lib/nuages/staticroot/
76 77
      WSGIScriptAlias / /usr/local/lib/nuages/nuages/wsgi.py
      WSGIPythonPath /usr/local/lib/nuages
78

79 80 81 82 83
      <Directory /usr/local/lib/nuages/nuages>
        <Files wsgi.py>
        Order deny,allow
        Allow from all
        </Files>
84
      </Directory>
85

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

91
    </VirtualHost>
92

93
Build database, collect static files and set permissions:
94

95
  # make update 
96

97
Set domain name: Point your browser to /admin/sites/site/1/ and modify the entry from "example.com" to your domain name.
Christophe Siraut's avatar
Christophe Siraut committed
98

99 100 101 102 103 104 105 106 107 108 109 110 111 112
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
Christophe Siraut committed
113 114 115
Update
======

116
In order to update your nuages installation:
Christophe Siraut's avatar
Christophe Siraut committed
117 118 119 120 121

  # make update

Migration
=========
122

123
When models change, we need to perform some manual steps to keep existing data. The following example backups all databases to json files, and resets only the poll table.
124

125 126 127
  # mkdir fixtures
  # APPS="account auth meetingpoll poll"
  # for APP in $APPS; do ./manage.py dumpdata $APP --indent=2 > fixtures/$APP.json; done
128
  # git pull
129 130
  # ./manage.py reset poll
  # ./manage.py loaddata fixtures/*.json
Christophe Siraut's avatar
Christophe Siraut committed
131