kevinbowen777 / django-api-library

Basic django api functionality demo using DRF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

django-api-library

Status GitHub Issues License

  • A basic library website & API built with Django 4.2.x & Django REST Framework (DRF) 3.13.x
Table of Contents

Features

Installation

  • git clone https://github.com/kevinbowen777/django-api-library.git
  • cd django-api-library
  • Local installation
    • poetry install
    • python manage.py migrate
    • python manage.py createsuperuser
    • python manage.py runserver
  • Docker installation
    • docker compose up --build
    • docker compose exec web python manage.py migrate
    • docker compose exec web python manage.py createsuperuser Additional commands:
      • docker compose exec web python manage.py shell_plus (loads Django shell autoloading project models & classes)
      • docker run -it django-start-web bash (CLI access to container)
  • Browse to http://127.0.0.1:8000 or http://127.0.0.1:8000/resources/
  • Pre-commit:
    • To add the hook, run the following command in the poetry shell:
      • pre-commit install

Testing

  • docker compose exec web python manage.py test
  • coverage run -m pytest
  • Nox (includes sessions for black, lint, safety, tests)
    • testing supported for Python 3.9, 3.10, 3.11, 3.12
    • e.g. nox, nox -rs lint-3.11, nox -s tests
      • nox
      • nox -s black-3.12
      • nox -s docs-3.11
      • nox -rs lint-3.9 (Use the 'r' flag to reuse existing session)
      • nox -s safety (will run tests against all Python versions)
      • nox -s tests

API URLs


Application Demo

A live application demonstration:

TBD


Screenshots

Home

Home

Index

Message Index

Profile Page

Profile Page

Login Page

Login Page

Book List View

Book List View

Swagger-UI

Swagger-UI

Redoc API page

Redoc API page

Menu Bar

Menu Bar

Email Address management

Email Address management


Reporting Bugs

Visit the Issues page to view currently open bug reports or open a new issue.

About

Basic django api functionality demo using DRF

License:MIT License


Languages

Language:JavaScript 49.5%Language:CSS 33.9%Language:HTML 7.9%Language:Python 6.9%Language:Shell 1.5%Language:Dockerfile 0.3%Language:Procfile 0.0%