django-core is a python tools module written for django.
Install via pypi:
pip install django-core
Below are the view mixins within django-core.
The view mixin that requires an authorization token.
Example Usage
from django.views.generic.base import TemplateView
from django_core.auth.views import AuthorizationTokenRequiredViewMixin
class MyView(AuthorizationTokenRequiredViewMixin, TemplateView):
template_name = 'path/to/template.html'
CORE_BASE_HTML_EMAIL_TEMPLATE: This is the default path to the html template to use for emails. The template must call the{{ email_content }}variable as this is the placeholder for the actual email content. This defaults todjango_core/mail/base_email.html.
From the tests directory where the manage.py file is, run:
python manage.py test
Run tests and output test coverage (requires coverage lib: pip install coverage):
coverage run manage.py test && coverage report --rcfile=../.coveragerc



