Skip to content

Ibercivis/EU-CS_platform

EU-CS_platform

EU-CS_platform is a web platform for Citizen Science. It is built with Python using the Django Web Framework.

Requirements

sudo apt install python3-venv python3-pip libpq-dev libffi-dev postgresql postgresql-10-postgis-2.4 libjpeg-dev zlib1g-dev gettext
python3 -m venv venv
source venv/bin/activate

Configure postgres

$ su - postgres
$ psql
postgres=# create database eucitizenscience;
postgres=# create user eucitizenscience with password 'XXXXXXXXXXXXXX';
postgres=# grant all on database eucitizenscience to eucitizenscience;
postgres=# \c eucitizenscience
postgres=# create extension postgis;

Installation

First of all, check whether you've up to Requirements. Second, clone the project with:

git clone https://github.com/Ibercivis/EU-CS_platform ~/EU-CS_platform
cd EU-CS_platform
pip install -r requirements.txt
cd src
cp eucs_platform/settings/local.sample.reference.env eucs_platform/settings/local.env

And edit src/eucs_platform/settings/local.env with database and email and other configuration variables

python manage.py migrate

Now, create superuser

python3 manage.py createsuperuser
python manage.py loaddata ./organisations/fixtures/organisation_types.json
python manage.py loaddata ./projects/fixtures/participationtasks.json
python manage.py loaddata ./projects/fixtures/status.json
python manage.py loaddata ./projects/fixtures/topics.json
python manage.py loaddata ./projects/fixtures/difficultylevel.json
python manage.py loaddata ./projects/fixtures/hastag.json
python manage.py loaddata ./projects/fixtures/geographicextend.json
python manage.py loaddata ./resources/fixtures/audiences.json
python manage.py loaddata ./resources/fixtures/themes.json
python manage.py loaddata ./resources/fixtures/categories.json

Launch

python manage.py runserver

Cron jobs commands

Manually:

python manage.py runcrons
python manage.py runcrons --force

And to do this automatically:

python manage.py crontab add