Skip to content

EasyFlutterApps/simple-django-rest-starter

Repository files navigation

Simple Django Rest Starter 🔗

Django logo

This is ready to deploy Django Starter Template for backend development which set up all the basic requirements and api routes for a Django project.

Powered by Mason Python Django Heroku

🚀 Features

  • Django 4.0 & Python 3.8
  • Ready to deploy on Heroku
  • SendGrid SMTP support
  • Django Rest Framework
  • Django Allauth
  • Custom Email Based Authentication
  • Custom Admin Interface
  • CORS Support

Usage 🚀

mason make simple_django_rest_starter

Variables ✨

variable description default type
name project name Simple Project string
email email address [email protected] string
password email password Null string

Prerequisites 💬

System Requirements:

  • Python 3.8+
  • Django 4.0+
  • SendGrid API Key

API Documentation 📚

https://documenter.getpostman.com/view/11585991/UzBjsneE

Virtual Environment ⚡️

Windows

  • Using Virtualenv: pip install virtualenv
virtualenv venv
cd venv/Scripts
activate

Linux & MacOS

  • Using Virtualenv: pip install virtualenv
virtualenv venv
source venv/bin/activate

Installation 📦

Install requirements

pip install -r requirements.txt

Migrations

python manage.py makemigrations
python manage.py migrate

Static files

python manage.py collectstatic

Create superuser

python manage.py createsuperuser

SMTP email

EMAIL_BACKEND = "sendgrid_backend.SendgridBackend"
FROM_EMAIL = os.environ['SEND_VERIFY_EMAIL']
DEFAULT_FROM_EMAIL = os.environ['SEND_VERIFY_EMAIL']
SENDGRID_ECHO_TO_STDOUT = True
SENDGRID_API_KEY = os.environ['SEND_GRID_API_KEY']
SENDGRID_SANDBOX_MODE_IN_DEBUG = False

Email Verified Redirect URL

ACCOUNT_CONFIRM_EMAIL_ON_GET = True
LOGIN_URL = 'http://localhost:8000/email-verified/'

Deployment 🚀

Heroku

heroku login
heroku config:set DISABLE_COLLECTSTATIC=1 --app <your-app-name>

Run Locally 🏃

python manage.py runserver

Issues 🐛

Here is a list of all the issues I have faced while developing this project. At the end of the development, I fixed all the problems, but I am still working on the issues I have not fixed yet. Some problems arise again, so we can have that issue as soon as possible while working on the projects.

1. CircularDependencyError (Filer Package)

Solution: django-cms/django-filer#1296

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published