Commit 13147b41 authored by jocelyn's avatar jocelyn Committed by Gogs
Browse files

Merge branch 'django' of Bertrand/wifi-with-me into django

parents 95d15ed1 a0b9be0e
We use bottle micro-framework.
In order to facilitate dependency management, you can use a pip and
a virtual environment (like virtualenv).
# apt-get install python-bottle
Install packages:
(current code works with debian-stable version of bottle)
# apt-get install python3-pip python3-virtualenv
Create and activate the virtualenv with:
$ pip install bottle
$ 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` requirements too:
Then hit *http://localhost:8080*
$ pip install -r requirements/base.txt -r requirements/dev.txt
To run in debug mode (auto-reload)
Set up configuration
$ DEBUG=1 ./
Create and edit configuration file `wifiwithme/settings/`
following this example:
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:
Default is to listen on ``, port `8080`.
But theses are optional settings for testing.
That needs to be set only if someone wants to receive notifications on each new contrib.
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.
Run development server
It is required to initialize database first:
$ ./ migrate
Create the DataBase
Then launch service with:
$ python createdb
$ ./ runserver
Build GeoJSON files
You can visit your browser at <>
$ python buildgeojson
Run production server
To be done
Drop the database
......@@ -52,23 +60,3 @@ 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 :
├── assets
│   └── main.css
└── views
└── base.tpl
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment