Url shortener app is a test assessment for Tranio
Install docker and docker-compose
After installation run the following command
docker-compose up -d --no-deps --build
And you are good to go
The following setup is for Linux users only
Create virtual environment
python3 -m venv venv
Activate it
source venv/bin/activate
Use the package manager pip to install requirements.
pip3 install -r requirements.txt
Create .env and .db.env files. Set the environment variables. Use this command:
cp .env.example .env
Use migrate
command to create tables and set relationships in your database.
python3 manage.py migrate
or
django-admin migrate
Run
python3 manage.py runserver
And you are good to go
- Link to the docs
Linting completed with flake8
flake8 --ignore=E501 --exclude=venv,docs .
Formatting completed with black
black shortener/