Skip to content

Latest commit

 

History

History
69 lines (51 loc) · 1.11 KB

README.md

File metadata and controls

69 lines (51 loc) · 1.11 KB

DRF-sample-API

this is a simple API base on Django and DRF .

this API built top of default ViewSet and Router, and have token authorization. there is diffrent api for admins control and users articles.
there is refresh and login, base on token.
schema base on swagger-ui and drf-spectacular

API Schema

Path -> /swagger-ui/

swagger-ui-screenshots

Usage

we start our python environment

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

after that we run collectstatic and migrate command on database

python manage.py migrate
python manage.py collectstatic

and running server

# with daphne
daphne core.asgi:application

# with django
python manage.py runserver

for unit-test

python manage.py test

Built In

  • python-3.13
  • django-5.1
  • djangorestframework-3.15
  • drf-spectacular-0.28
  • drf-spectacular-sidecar-2024.12
  • daphne-4.1