nuages.rst 4.15 KB
Newer Older
1 2 3 4
======
Nuages
======

Christophe Siraut's avatar
Christophe Siraut committed
5 6 7 8 9 10 11 12 13
''Easy poll sharing''

A collaborative meeting poll system, similar to doodle or rdvz. This application was named after Django's famous song and because computer work is easier when its cloudy. It is build in python, using the django framework and a little of javascript.

Feedback and collaboration are welcome at nuages@lists.domainepublic.net. (Inscription to the mailing list is recommended before posting) We have a project page at projets.domainepublic.net.

 Get Nuages:: git clone http://git.domainepublic.net/git/nuages.git
 Browse changes:: http://git.domainepublic.net/?p=nuages.git
 Sources freely available under license GPL. 
14

Christophe Siraut's avatar
Christophe Siraut committed
15
The project uses the following django applications:
16

Christophe Siraut's avatar
Christophe Siraut committed
17 18 19
    - django-registration
    - django-datetime-widget
    - django-bootstrap-staticfiles
20

Christophe Siraut's avatar
Christophe Siraut committed
21 22
Installation
============
23

Christophe Siraut's avatar
Christophe Siraut committed
24 25 26
Normal installation
----------------------
On debian derivatives Nuages can can be installed and configured with dpkg:
27

Christophe Siraut's avatar
Christophe Siraut committed
28
  dpkg -i python-nuages*.deb nuages*.deb
29

Christophe Siraut's avatar
Christophe Siraut committed
30 31 32
Python package installation
---------------------------
Using setuptools all dependencies will be installed:
33

Christophe Siraut's avatar
Christophe Siraut committed
34
  # python setup.py install
35

Christophe Siraut's avatar
Christophe Siraut committed
36 37 38
Development installation
------------------------
Install python-django package (>=1.5)
39
Clone nuages archive somewhere in your home folder::
40 41 42 43

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

44
You can have local customizations in the nuages/local_settings.py file (and avoid modify the original settings.py)::
45

46
    # vi nuages/local_settings.py
Christophe Siraut's avatar
Christophe Siraut committed
47
    # vi nuages/local_urls.py
48

49
Build nuages database::
50

51
    # ./manage.py syncdb
Christophe Siraut's avatar
Christophe Siraut committed
52
    # ./manage.py migrate meetingpoll
53

54
Start the python webserver::
55

56
    # ./manage.py runserver
57

58
You should have the application running at http://127.0.0.1:8000
59

Christophe Siraut's avatar
Christophe Siraut committed
60 61 62 63 64
Configuration
=============
Web server
----------
There are several ways to configure Apache and python, we use wsgi by default. After installing the package, two example configuration are available in /etc/apache2/sites-available. (Note if you use Apache < 1.4, you need to remove the "require" directive)
65

66
You can have local customizations in the local_settings.py file. (Optionally set DEBUG option to False)::
67

Christophe Siraut's avatar
Christophe Siraut committed
68
    # vi /etc/nuages/local_settings.py
69

70
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
71

72
SSL
Christophe Siraut's avatar
Christophe Siraut committed
73
---
74
We recommend using SSL for all transactions and adding the following settings to your local_settings.py::
75

76 77 78
  SESSION_COOKIE_SECURE = True
  CSRF_COOKIE_SECURE = True
  ALLOWED_HOSTS = [
79 80
        '.domainepublic.net', # Allow domain and subdomains
        '.domainepublic.net.', # Also allow FQDN and subdomains
81
  ]
82

Christophe Siraut's avatar
Christophe Siraut committed
83

84
Email Service
Christophe Siraut's avatar
Christophe Siraut committed
85
-------------
86 87
Django is expecting a working SMTP server listening at localhost, sendmail for instance.

88
Another option is to add attributes in local_settings.py, so django can connect to an external server for the mail delivery. To enable this, we only have to add these lines::
89 90 91 92 93 94 95 96

  # 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
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
Contributing
============
Patches are welcom: please send us a mail or join Domaine Public irc to let us know your propositions.

Testing
-------
Please validate your modifications with::

  # make test

Translations
------------
Nuages is avalable in many languages. If you have a little time and want help translate Nuages in your language, your help is welcome. You can translate the following file to your language, and present it on the mailing list::

 http://git.domainepublic.net/?p=nuages.git;a=blob_plain;f=locale/fr/LC_MESSAGES/django.po

Adding a new translation
~~~~~~~~~~~~~~~~~~~~~~~~ 
Create/update a translation file::

    # django-admin makemessages -l fr

Edit and translate the translation file::

    # vi locale/fr/LC_MESSAGES/django.po

Compile translated messages/update a translation file::

    # make translation
Christophe Siraut's avatar
Cleanup  
Christophe Siraut committed
126

Christophe Siraut's avatar
Christophe Siraut committed
127 128 129
Migrations
==========
Migrations are handled automatically through South.
Christophe Siraut's avatar
Cleanup  
Christophe Siraut committed
130

Christophe Siraut's avatar
Christophe Siraut committed
131
When migrating from a Nuages version < 0.20140730, one need to manually do::
132

Christophe Siraut's avatar
Christophe Siraut committed
133 134 135
  # copy old database (/usr/local/lib/nuages.sqlite) to /var/lib/nuages/db.sqlite
  nuages syncdb
  nuages migrate meetingpoll 0001 --fake
Christophe Siraut's avatar
Cleanup  
Christophe Siraut committed
136