Go to file
2018-09-05 15:36:49 +00:00
apps Update draft deletion logic for new field 2018-06-27 19:50:24 +01:00
bin Update lots of things 2017-06-16 18:10:44 +02:00
ojusomap Add test bucket when testing, so we can nuke debug files 2018-06-27 19:30:25 +01:00
support Translated using Weblate (English (United Kingdom)) 2018-05-26 06:54:03 +00:00
traefik Add traefik config 2018-04-19 11:56:15 +00:00
.dockerignore Update .*ignore files to exclude envars 2017-05-21 01:54:15 +02:00
.gitignore Get a basic pytest CI in there. 2018-04-12 21:15:24 +02:00
.gitlab-ci.yml Update .gitlab-ci.yml 2018-06-06 14:57:11 +00:00
docker-compose.yml Add missing MEMCACHED_HOST to fix Weblate 2018-04-23 01:57:28 -04:00
Dockerfile Add registration and login templates plus UI stuff, moderation 2017-10-08 21:21:51 +01:00
environment.sh Add registration and login templates plus UI stuff, moderation 2017-10-08 21:21:51 +01:00
environment.template Use MailGun via django-anymail instead of Gandi 2018-04-03 17:46:04 -04:00
local.env Add registration and login templates plus UI stuff, moderation 2017-10-08 21:21:51 +01:00
local.yml Don't run collectstatic for every. single. change 2018-03-29 01:21:54 -04:00
manage.py Add Django project and nginx conf + deps 2017-05-18 23:51:17 +02:00
ojuso-logo.svg Add the ojuso logo as a simplified SVG 2018-04-15 22:55:43 +10:00
README.md Add Fedora postgres set-up instructions 2018-09-05 11:35:07 -04:00
requirements-devel.txt Add requirements-devel 2018-04-23 02:03:06 -04:00
requirements-test.txt Add django-override-storage to test reqs 2018-05-01 13:31:07 -04:00
requirements.txt Add coordinates autocomplete widget & data (#32) 2018-04-16 14:27:13 +10:00
setup.cfg Get a basic pytest CI in there. 2018-04-12 21:15:24 +02:00
system-requirements-debian.txt Split system requirements for Debian & Fedora 2018-05-19 13:53:34 -04:00
system-requirements-fedora.txt Update setup instructions 2018-09-05 11:33:25 -04:00

Translation pipeline status coverage report

ojuso-map

Kickass map for the Ojuso Project

Getting Started

Check out the code

$ git clone git@gitlab.com:autonomic-cooperative/ojuso-map.git
$ cd ojuso-map

All commands from here on should be run in the ojuso-map directory.

Install System Dependencies

Debian / Ubuntu

$ xargs < system-requirements-debian.txt sudo apt-get install -y

Fedora

$ xargs < system-requirements-fedora.txt sudo dnf install

If you hadn't previously installed Postgres, you will need to initialise the database and start the server:

$ sudo postgresql-setup --initdb --unit postgresql
$ sudo systemctl start postgresql

Bootstrap the Virtual Environment

Set up your Python virtual environment in the .venv folder:

$ python3 -m venv .venv
$ source .venv/bin/activate

Configure the Environment

$ export DEBUG=1
$ export DJANGO_SETTINGS_MODULE=ojusomap.settings

Install the Python Dependencies

$ pip3 install --upgrade pip setuptools
$ pip3 install -r requirements-devel.txt

If you run into issues with psycopg2 you may need to run the following:

$ pip3 uninstall psycopg2 && pip3 install --no-binary :all: psycopg2

Ensure Postgres is running and accessible

You should be able to connect to Postgres:

$ psql -U postgres -h localhost

(enter "postgres" as the password)

If not, follow these instructions to change the Postgres authentication options (NB on Fedora / Centos, pg_hba.conf is located in /var/lib/pgsql/data), then run:

$ echo "ALTER USER postgres WITH PASSWORD 'postgres';" | psql -U postgres

Run The Migrations

$ python manage.py migrate

Start the server

$ python manage.py runserver

Resuming work

For each new terminal session, you will need to run:

$ cd ojuso-map
$ source .venv/bin/activate
$ export DEBUG=1
$ export DJANGO_SETTINGS_MODULE=ojusomap.settings
$ python manage.py runserver

Running The Tests

$ pip install -r requirements-test.txt
$ pytest -v