Formulaire & carte pour recenser les aspirant-e-s connecté-e-s à un réseau radio.

vross d0cd5fbfd6 Send the URL of the new request's map marker in the e-mail notification 1 year ago
requirements ddcd5b6f33 requirements: accept bug-fixes/security releases 2 years ago
var f15f21d91e Bootstrap Django skeleton 3 years ago
wifiwithme d0cd5fbfd6 Send the URL of the new request's map marker in the e-mail notification 1 year ago
.gitignore 843e58be8d Ignoring venv and .idea folders 2 years ago
LICENSE 0b4ffe0b21 Create LICENSE 4 years ago
README.md 481578596a Mention that the `ISP` setting is mandatory 2 years ago
manage.py f15f21d91e Bootstrap Django skeleton 3 years ago

README.md

Dependencies

In order to facilitate dependency management, you can use a pip and a virtual environment (like virtualenv).

Install packages:

 # apt-get install python3-pip python3-virtualenv libyaml-dev

Create and activate the virtualenv with:

 $ virtualenv -p $(which python3) venv
 $ source venv/bin/activate

We use django framework. Install it from requirements with pip:

 $ pip install -r requirements/base.txt

For development, install dev.txt instead:

 $ pip install -r requirements/dev.txt

Set up configuration

Then create and edit a wifiwithme/settings/local.py configuration file wifiwithme/settings/local.py.

Mandatory settings

You must Define some details about your ISP in the ISP variable, eg:

ISP={
    'NAME':'FAIMAISON',
    'TITLE':'Réseau wifi expérimental',
    'SITE':'//www.faimaison.net',
    'EMAIL':'bureau (at) faimaison.net',
    'ZONE':'Nantes et environs',
    'ADDRESS_EXAMPLE': 'rue du calvaire, nantes',
    'URL_CONTACT':'//www.faimaison.net/pages/contact.html',
    'LATITUDE':47.218371,
    'LONGITUDE':-1.553621,
    'ZOOM':13,
    'CNIL':{
        'LINK':'//www.faimaison.net/files/cnil-faimaison-1819684-withwithme.pdf',
        'NUMBER':1819684
    }
}

Optional settings

Website URL

The wifi-with-me website URL (for links included in emails :)

SITE_URL="http://example.tld"

URL Prefix

Optionaly, you can define an url prefix (ex: /foo/) so that wifi-with-me is accessible under http://example.com/foo/ :

URL_PREFIX='foo/'

Notifications

If you to receive notifications on each new contrib, customize those :

List of notification recipients:

NOTIFICATION_EMAILS=['admin@example.tld']

Notification sender address:

DEFAULT_FROM_EMAIL='notifier@example.tld'

Migrate from bottle version (optional)

If you used the (old) bottle version of wifi-with-me and want to migrate your data follow this extra step :

$ ./manage.py migrate auth
$ ./manage.py migrate contribmap 0001 --fake

Run development server

It is required to initialize database first:

$ ./manage.py migrate

Then launch service with:

$ ./manage.py runserver

You can visit your browser at http://127.0.0.1:8000/map/contribute

Run production server

To be done

Drop the database

$ rm db.sqlite3

What else ?