Skip to content

Exercises on building a REST API using Django Rest Framework and other technologies.

Notifications You must be signed in to change notification settings

JiHongKim98/drf-api-practice

Repository files navigation

DRF API Practice

Exercises on building a REST API using Django Rest Framework and other technologies.

Technologies Used

  • Django REST Framework
  • Simple-JWT
  • Celery & Celery Beat
  • RabbitMQ
  • DRF-Spectacular

Basic Features

  • API Documentation using DRF-Spectacular
  • Email verification on user registration
  • Scheduled tasks at regular intervals
  • Custom JWT authentication for HttpOnly attribute
  • CRUD operations for Posts, Comments, and Users
  • Dockerization for local development

ER-Diagram

Implemented a simple structure using SQLite3 to practice integrating API CRUD operations and other technologies.

Entity-Relationship Diagram generated using dbdiagram.io

drf-api-practice

Getting Started

Clone this repository to your local machine, rename the .env.example file to .env, and update the environment variables accordingly.
Then, run the following command:

$ docker-compose up

And you can navigate to http://localhost:8000/docs/swagger/ or http://localhost:8000/docs/redoc/ to view the the API documentation.


If you want start test or create super user:

# start test
$ docker-compose exec web python3 manage.py test

# create super user
$ docker-compose exec web python3 manage.py createsuperuser

If you encounter the exec /code/entrypoint.sh: no such file or directory error while running docker-compose up on Windows.
Execute the following command to disable automatic conversion from LF to CRLF:

$ git config --global core.autocrlf false

After running this command, clone the repository again to ensure proper configuration.