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

Jocelyn Delande f15f21d91e Bootstrap Django skeleton 9 years ago
assets 5ccc500851 Replaced current time querystring on GeoJSON path by the JSON mtime fixes #13 9 years ago
contrib b460080d5d Update wifiwithme.yml 10 years ago
json e6d546b8f7 added placeholder in json folder to avoid nonexistant folder error 10 years ago
requirements f15f21d91e Bootstrap Django skeleton 9 years ago
var f15f21d91e Bootstrap Django skeleton 9 years ago
views 36f9e75fa0 legal.tpl: fix full licence name 9 years ago
wifiwithme f15f21d91e Bootstrap Django skeleton 9 years ago
.gitignore f15f21d91e Bootstrap Django skeleton 9 years ago
LICENSE 0b4ffe0b21 Create LICENSE 10 years ago
README.md 7b324e6fdd Added ability to specify an alternate template/assets dir to override default ones file-by-file. 9 years ago
TODO.md 6c79c9a09e Todo: captcha or honeypot. 10 years ago
backend.py 5ccc500851 Replaced current time querystring on GeoJSON path by the JSON mtime fixes #13 9 years ago
manage.py f15f21d91e Bootstrap Django skeleton 9 years ago

README.md

Dependencies

We use bottle micro-framework.

 # apt-get install python-bottle

(current code works with debian-stable version of bottle)

or

$ pip install bottle

Running

$ ./backend.py

Then hit http://localhost:8080

To run in debug mode (auto-reload)

$ DEBUG=1 ./backend.py

Bottle will reload on source change, but not on template change if you're using an old version of bottle.

You can specify listening port and address by setting BIND_PORT and BIND_ADDR env vars, ex:

BIND_ADDR='0.0.0.0' BIND_PORT=8081 ./backend.py

Default is to listen on 127.0.0.0, port 8080.

You can also pass a URL_PREFIX='/some_folder/' if you don't want the app to be served at the root of the domain.

Create the DataBase

$ python backend.py createdb

Build GeoJSON files

$ python backend.py buildgeojson

Drop the database

$ rm db.sqlite3

What else ?

Customizing appearance

Wether you like or not balloons, you may want to override some templates and/or static files.

You can mention a CUSTOMIZATION_DIR as environ variable. In that dir, you can create assets and views subdirs, containing files with the name of the original files you want to override from default assets and views.

For example to override only main.css and base.tpl, you would set CUSTOMIZATION_DIR=/home/alice/my-fancy-isp-theme and use the following directory layout :

/home/alice/my-fancy-isp-theme/
├── assets
│   └── main.css
└── views
    └── base.tpl