Skip to content

A dockerized Django API for locking resources preventing multiple users from making changes. Authentication, input validation, API versioning and testing included.

License

Notifications You must be signed in to change notification settings

PedroCorreia105/DjangoResourceLocker

Repository files navigation

NestJs Logo

Python Version Pip Version code style: black CodeFactor Code Coverage Build License

DescriptionStackInstallationDatabaseRunning the appEndpointsTestVideo TutorialsHelpful reposLicense

Description

A dockerized Django API for locking resources preventing multiple users from making changes. Authentication, input validation, API versioning and testing included.

Stack

Language Python
Framework Django
Database SQLite3
Cache Redis
Linter Black
CI AppVeyor

Installation

# Create virtual environment
$ python -m venv .venv

# Activate virtual environment
$ source .venv/bin/activate

# Install dependecies
$ pip install -r requirements.txt

Database

# Generate migrations
$ python manage.py makemigrations

# Apply migrations
$ python manage.py migrate

# Create admin user
$ python manage.py createsuperuser

# Launch redis
$ docker-compose up redis -d

# Redis cli
$ docker-compose exec redis redis-cli -a pass -n 1

Running the app

# Launch server
$ python manage.py runserver

Endpoints

# API
http://localhost:8000/api

# Swagger UI
http://localhost:8000/docs

# Administration UI
http://localhost:8000/admin

Test

# Run tests
$ python manage.py test

# Run tests with code coverage
$ python run_tests_with_coverage.py

Video Tutorials

Helpful repos

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A dockerized Django API for locking resources preventing multiple users from making changes. Authentication, input validation, API versioning and testing included.

Topics

Resources

License

Stars

Watchers

Forks