/digital-survey

Web application to create, manage and compile surveys

Primary LanguagePython

DigitalSurvey

First configuration

  1. clone the repo
git clone git@github.com:FarhanGazi/digital-survey.git
  1. connect to postgresql database
psql
  1. Execute the first sql script located inside db/ folder of digital-survey project
database => \i ~/path/to/digital-survey/db/script1.sql
  1. Go inside digital-survey project dir
cd ~/path/to/digital-survey
  1. Create config.yaml file in the root of digital-survey folder in the following format:
ds:
  database:
    driver: postgresql
    username: username
    password: password
    host: localhost
    port: 5432
    databasename: databasename
  application:
    secretkey: secret
admin:
  database:
    driver: postgresql
    username: username
    password: password
    host: localhost
    port: 5432
    databasename: databasename
  application:
    secretkey: secret
panelist:
  database:
    driver: postgresql
    username: username
    password: password
    host: localhost
    port: 5432
    databasename: databasename
  application:
    secretkey: secret
  1. Create virtual evnvironment in python3 and intsall all the packeges
cd ~/path/to/digital-survey
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
  1. Create project environment variables
export FLASK_APP=ds
export FLASK_ENV=development
  1. Run the project
flask run
  1. From the project database ds execute the second script
psql ds
ds => \i ~/path/to/digital-survey/db/script2.sql
  1. That's it! Enjoy Digital Survey ;)