Requires Python 3.3 or Python 2.7.
/!\ If running on Python2 (only 2.7 supported), you must install unicodecsv
.
/!\ The system was created specifically for the Mali Hotline and thus is not properly packaged to be duplicated.
To facilitate your setup, consider copying and adjusting the following configurations.
- Create a user account (
douentza
at/home/douentza
) - Clone github project
- Create a virtualenv (
douentzaenv
) - Edit the settings at
douentza/settings_local.py
to change the phone numbers of your SIM cards - Edit reply message at
douentza/urls.py
- Change the operators names and guessing function (
operator_from_mali_number
) atdouentza/utils.py
- Install the dependencies in the virtualenv
pip install –r requirements.pip
- Create the DB and super user account with
./manage.py syncdb
- Customize the
douentza/fixtures/Ethnicity.json
file - Customize the
douentza/fixtures/Entity.json
file - Customize the
douentza/fixtures/Cluster.json
file - Load your fixtures with
./manage.py loaddata fixtures/*.json
- Create folders for cached files
mkdir –p cached_data/protected
. - Install and configure nginx
- Use the Django Admin UI (
/admin/
) to create user accounts for agents and assign them clusters. - Install FondaSMS app on the phones.
- Configure the phones to use the server URL (
http://server-addr.tld/fondasms
).
server {
listen 80;
server_name douentza.com;
root /home/douentza/douentza/;
## Compression
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 4;
gzip_http_version 1.0;
gzip_min_length 1280;
gzip_types text/plain text/csv text/css application/x-javascript text/xml application/json application/xml application/xml+rss text/javascript image/x-icon image/bmp application/font-woff;
gzip_vary on;
location /static/ {
if ($query_string) {
expires max;
}
alias /home/douentza/douentza/static/;
autoindex on;
}
location /protected/ {
expires max;
root /home/douentza/douentza/cached_data/;
internal;
}
location /admin_static/ {
root /home/douentza/douentzavenv/lib/python3.3/site-packages/django/contrib/admin/media;
}
location / {
add_header 'Access-Control-Allow-Origin' "*";
add_header 'Access-Control-Allow-Credentials' "true";
proxy_pass http://127.0.0.1:8887;
proxy_set_header X-Real-IP $remote_addr;
}
}