2017-05-19 16:03:38 +03:00
2017-05-18 13:47:12 +03:00
2017-01-25 18:31:50 +02:00
2017-02-01 17:27:00 +02:00
2017-05-18 22:18:31 +03:00
2017-05-18 15:49:04 +03:00

SIKWEB 2.0

Accessing the source

Clone this repository and enter it

Set up your SSH key authentication in GitLab Profile Settings. Then clone the repository:

git clone git@sika.sahkoinsinoorikilta.fi:vtmk/web2.0.git
cd web2.0

Change to the development branch:

git checkout develop

Install Python3

Python version >3.5, pip and virtualenv are needed.

Install with apt:

sudo apt install python3
sudo apt install python3-pip
sudo pip install virtualenv

Install PostgreSQL

Version >9.5 is needed. More info at: https://www.postgresql.org/

Install with apt:

sudo apt install postgresql

Install dependencies

The following packages might need to be installed depending on your system. Find the corresponding packages from your distribution's repository.

  • python3-dev
  • libffi-dev
  • python3-cffi
  • libssl-dev

The packages shouldn't be needed on Ubuntu 16.04, which is the most tested platform.

Install them with apt:

sudo apt install python3-dev libffi-dev python3-cffi libssl-dev

Create a virtual environment for python

Create a virtualenv in the parent directory.

virtualenv -p python3 ../virtualenv.sikweb

Activate virtualenv

Assuming we are at the root of this repository and virtualenv is one level above.

. ../virtualenv.sikweb/bin/activate

Run install wizard

Run the install wizard with

sh setup.sh

and follow the instructions.

Running

Use runserver command

python manage.py runserver 0.0.0.0:8000

Using address 0.0.0.0 will bind all IP addresses.

Visit the page

Visit https://localhost:8000 in your browser!

Run unit tests

python manage.py test -v 2
S
Description
Web 2.0 Backend. Django, Angular
Readme 21 MiB
Languages
JavaScript 54.6%
Python 36.7%
HTML 6.6%
CSS 1.8%
Shell 0.2%