- PostgreSQL with PostGIS extension
- Python 3.4
- Django 1.9
- django-modeltranslation (http://django-modeltranslation.readthedocs.org)
- Django REST framework (http://www.django-rest-framework.org/)
- munigeo (https://github.com/City-of-Helsinki/munigeo)
- django-reversion (http://django-reversion.readthedocs.org)
virtualenv -p /usr/bin/python3 ~/.virtualenvs/
workon kerrokantasi
Install all required packages with pip command:
pip install -r requirements.txt
python manage.py i18n:compile
- Import the dump of a Kuulemma database into your PostgreSQL instance
(the default expected database name is
kerrokantasi_old
). - Run
migrator/process_legacy_data.py -p
; if the PG database iskerrokantasi_old
, no arguments should be necessary. (Otherwise, see--help
.) This will generate three files:kerrokantasi.xml
-- an XML dump of the original PG databasekerrokantasi.geometries.json
-- a temporary JSON file of the GIS geometries in the original PG databasekerrokantasi.json
-- a reformatted amalgamation of the XML and geometry files to be ingested by thedemocracy_import_json
management command.
- Copy the
images
directory from your Kuulemma filesystem'skuulemma/static
directory to thekerrokantasi
media directory (defaults tokerrokantasi/var/media
). - Run the
democracy_import_json
management command with the path of the JSON file created in step 3. - Done.
To run all tests, execute command in project root directory.
py.test
Run test against particular issue.
py.test -k test_7 -v
Translations are maintained on Transifex.
- To pull new translations from Transifex, run
npm run i18n:pull
- As a translation maintainer, run
npm run i18n:extract && npm run i18n:push
to push new source files.