django-template-backend

Django Template Backend


Keywords
django, backend
License
MIT
Install
pip install django-template-backend==1.0

Documentation

Django Template Backend

A template for Django apps with support for Django REST Framework, filters, Celery tasks, Beat schedules tasks, pytest, and other things.

Setup

  1. Install the project dependencies
$ pipenv install --dev
  1. Refactor "template" names throughout project to desired name

  2. Create models

  3. Make migrations and migrate the database

$ pipenv run python manage.py makemigrations
$ pipenv run python manage.py migrate
  1. Start the Django server
$ pipenv run python manage.py runserver
  1. Optionally start the Celery related processes
$ redis-server
$ pipenv run celery -A template_project worker -l info
$ pipenv run celery -A template_project beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler

Tests

Tests are setup to run through Pytest. They can be invoked with:

$ pipenv run python manage.py test

or

$ pipenv run python -m pytest