Code Monkey home page Code Monkey logo

vocationqa's Introduction

vocationQA

Question & Answer systen for vocational formation

Instalation

Download project form github::

git clone https://github.com/ydiazn/vocationQA.git

Python dependencies

You need python 3.6+ an optionally but recommended venv python module for virtual environment::

apt-get install python3-venv

Install python dependencies in virtual environment

python3 -m venv env
source env/bin/activate
pip install -r requeriments/local.txt

In above example env is virtual environment name.

If you are behind a proxy set proxy virtual environment before installation with pip

export http_proxy=http://username:password@host:port
export https_proxy=http://username:password@host:port

Project config

You must set following environment variable:

  • VOCATION_SECRET_KEY

Virtual environments can be set in self virtual environment. For example for set DB_NAME you can type

echo 'export VOCATION_SECRET_KEY="76jiorwu6=1&hu=)-cc$b-by-o16#mpcy-frp=^jvp(#=5_"' >> venv/bin/activate

You can edit activate script directly.

For use postgresql you can change database setting by

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': os.environ.get("VOCATION_DB_NAME"),
        'HOST': os.environ.get("VOCATION_DB_HOST"),
        'PORT': os.environ.get("VOCATION_DB_PORT"),
        'USER': os.environ.get("VOCATION_DB_USER"),
        'PASSWORD': os.environ.get("VOCATION_DB_PASSWORD"),
        'ATOMIC_REQUESTS': True,
    }
}

and set the following environment variables:

  • VOCATION_DB_NAME
  • VOCATION_DB_HOST
  • VOCATION_DB_PORT
  • VOCATION_DB_USER
  • VOCATION_DB_PASSWORD

You must deactivate and active again the virtual environment after set environment variables in virtual environment.

Run project

First asure that virtual environment are active

source env/bin/activate

Run django migrations and create a superuser

python vocationQA/manage.py migrate
python vocationQA/manage.py createsuperuser

Finally run django web server::

python vocationQA/manage.py runserver

and open web browser at http://127.0.0.1:8000

vocationqa's People

Contributors

ydiazn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.