4
2 Comments

Django REST Framework Boilerplate

https://github.com/bnisevic/drf_boilerplate_v2

For a recent project I couldn't find anything useful. So I made this boilerplate which hopefully can save you some time. Just click green "Use this template" button and you are good to go with your new backend.

The boilerplate includes following:

  • djoser - REST implementation of Django authentication system. djoser library provides a set of Django Rest Framework views to handle basic actions such as registration, login, logout, password reset and account activation. It works with custom user model.
  • SimpleJWT - Simple JWT provides a JSON Web Token authentication backend for the Django REST Framework. It aims to cover the most common use cases of JWTs by offering a conservative set of default features.
  • django-environ - For decoupling environment setting variables from the code. It allows you to utilize 12factor inspired environment variables to configure your Django application.
  • drf-yasg - Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.
  • Custom user model - Ready to be further extended.
  • Email instead of username (username does not exist) - Django comes by default with username as unique user identifier. But most of use cases would expect email to be in that role. With this boilerplate email is used instead of username. But there is another boilerplate without this feature https://github.com/bnisevic/drf_boilerplate_v1.
  • Best practice structure for the settings files.

The boilerplates support current Python 3.8, Django 3.1 and Django REST Framework v3.11.

Feel free to raise some issues on the repos if you need any improvement.

Trending on Indie Hackers
After 10M+ Views, 13k+ Upvotes: The Reddit Strategy That Worked for Me! 42 comments Getting first 908 Paid Signups by Spending $353 ONLY. 24 comments I talked to 8 SaaS founders, these are the most common SaaS tools they use 20 comments What are your cold outreach conversion rates? Top 3 Metrics And Benchmarks To Track 19 comments Hero Section Copywriting Framework that Converts 3x 12 comments Join our AI video tool demo, get a cool video back! 12 comments