A Django REST Framework template for building RESTful APIs
Find a file
2025-09-03 02:40:10 +08:00
.docker Move to uv/pyproject and overhaul project structure 2025-09-01 02:10:28 +08:00
.woodpecker Update .deploy.yml 2025-09-03 02:29:24 +08:00
src Add in CSRF config 2025-09-03 02:40:10 +08:00
.dockerignore Move to uv/pyproject and overhaul project structure 2025-09-01 02:10:28 +08:00
.env.sample Reimplement caching 2025-09-03 02:25:42 +08:00
.gitignore Move to uv/pyproject and overhaul project structure 2025-09-01 02:10:28 +08:00
.python-version Move to uv/pyproject and overhaul project structure 2025-09-01 02:10:28 +08:00
docker-compose.dev.yml Update docker-compose.yml files 2025-09-03 02:32:58 +08:00
docker-compose.yml Fix bind mount in docker-compose.yml 2025-09-03 02:33:41 +08:00
Dockerfile Update Dockerfile 2025-09-01 02:24:43 +08:00
pyproject.toml Reimplement caching 2025-09-03 02:25:42 +08:00
README.md Update README.md and deploy.yml 2025-09-01 03:03:46 +08:00
uv.lock Reimplement caching 2025-09-03 02:25:42 +08:00

DRF-Template

Build Status Demo Page Status

A barebones Django REST Framework template for personal use in projects.

  • Pre-templated emails
  • Debug mode profiling (via Django Silk)
  • A working Woodpecker CI/CD template for automated deployments (see service_queue for more info)

A live API demo can be found here

Development

  • Create a copy of the .env.sample file and name it as .env in the same directory
  • Populate .env with values
  • Run docker-compose -f docker-compose.dev.yml up

When using docker-compose.dev.yml, the entire project directory is mounted onto the container allowing for hot-reloading. This requires DEBUG to be set to True.

Also make sure to follow through the steps shown in the stripe-listener container for initial setup with Stripe.

Deployment

A sample docker-compose.yml is provided which I use in hosting the demo. DEBUG should be set to False when deploying as to not expose the URLs fro Celery Flower and the Django Silk Profiler. The local Inbucket container is not present with DEBUG turned off so make sure to specify an external SMTP server to process emails properly.

URLs