FFDN ISP Database

pitchum ade50e0dac Fix 'cannot create column with spatialite -> unexpected metadata layout' 1 year ago
ffdnispdb ade50e0dac Fix 'cannot create column with spatialite -> unexpected metadata layout' 1 year ago
.gitignore a21e544851 More gitignore. 1 year ago
AUTHORS 6ecced052a [mod] Update Gu1 email, and fork github deps on code.f.o (refs adminsys email) 2 years ago
LICENSE 6871cede74 Add a 3-clause BSD License in the LICENSE file 5 years ago
README.md ce10d6f667 Fix libspatialite.so: undefined symbol: sqlite3_spatialite_init 1 year ago
TODO ba6088526a Update TODO list with a proposal from julienth37 4 years ago
app_prod.py ab6fece2f9 Add an app file to use in production 5 years ago
babel.cfg 8bbdd2c9f7 Implement javascript i18n using a jinja tempate, add Flask-Cache for caching 5 years ago
manage.py d2a6d5fb89 Upgraded Flask-based dependencies. 1 year ago
requirements.txt 91b02bbb93 Replace Flask-Cache with Flask-Caching. 1 year ago
settings_dev.py d2a6d5fb89 Upgraded Flask-based dependencies. 1 year ago
settings_prod.py.dist d2a6d5fb89 Upgraded Flask-based dependencies. 1 year ago
test_ffdnispdb.py d2a6d5fb89 Upgraded Flask-based dependencies. 1 year ago
variables.less 2c57a65651 Add a search input in navbar and a hover effect on nav buttons 5 years ago

README.md

ffdnispdb

ffdnispdb is a website designed to display all the ISPs implementing the ispschema specification.

How to install & develop

ffdnispdb requires python2.

Third-party dependencies:

  • sqlite
  • libspatialite

On a Debian Jessie system, do:

apt install sqlite3 libspatialite-dev libsqlite3-mod-spatialite

Preferably in a virtualenv, run:

pip install -r requirements.txt
python manage.py db create

To start the development server, run:

python manage.py runserver

Production deployment

To deploy this application, we recommend the use of gunicorn/gevent. We strongly discourage you to use a synchronous WSGI server, since the app uses Server-sent events.

First, copy the example settings file:

cp settings_prod.py.dist settings_prod.py

Then, edit the newly created settings_prod.py: generate a random SECRET_KEY, add yourself to the ADMINS array. To see the full list of available settings, see the ffdnispdb/default_settings.py file and Flask's documentation.

Now, you can run gunicorn using the app_prod.py file, which logs warnings to an application.log file and send you errors by email.

gunicorn -k gevent -b 127.0.0.1:8080 --log-level warning app_prod:app

You can also edit app_prod.py to customize logging behavior.

How to translate

First, generate the template:

pybabel extract -F babel.cfg -o messages.pot ffdnispdb

Then initialize the catalog for the language you want:

pybabel init -i messages.pot -d ffdnispdb/translations -l XX

(where XX is the language code)

Once you're done translating, run:

pybabel compile -d ffdnispdb/translations

Now, you can add your language to the LANGUAGES dict in ffdnispdb/default_settings.py.

To update the catalog with the latest strings:

pybabel extract -F babel.cfg -o messages.pot ffdnispdb
pybabel update -i messages.pot -d ffdnispdb/translations

Once you've tested your work and you're satisfied with the result, you can send us a patch (or the po file directly).