Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.07 KB

README.md

File metadata and controls

46 lines (32 loc) · 1.07 KB

Installation

Using a virtual environment to install dependencies

Using the venv module that is now part of the standard library (python 3.3+). Might not be installed in some Linux distros and in that case sudo apt-get install python3-venv should do it for Ubuntu.

# creating the virtual env
$ python3 -m venv <your_env_dir>
# activating the environment
$ source <your_env_dir>/bin/activate

Installing dependencies

$ pip install -r requirements.txt

Db migration

The configured database is sqlite (just for demonstration purposes)

$ python manage.py migrate
# create an administrator account
$ python manage.py createsuperuser --email admin@example.com --username admin

Run the tests

$ python manage.py test

Run the app

$ python manage.py runserver

This project is using the Django's REST framework api view, so it has also an html ui at localhost:8000/loans.

The admin has access to everything but it's possible to create other users and play around with the permissions by accessing localhost:8000/admin