Skip to content
Django Templates Names by @phpdude
Python
Branch: master
Clone or download
Latest commit 380fe9f May 8, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
template_names added code comments and tests May 7, 2017
.gitignore added code comments and tests May 7, 2017
CHANGELOG.markdown added code comments and tests May 7, 2017
README.markdown Update README.markdown May 7, 2017
setup.py v0.1.0 Apr 21, 2015
tests.py added code comments and tests May 7, 2017

README.markdown

Django Template Names v0.2.1 - templates names normalization helper.

Django Template Names is a small mixin which allows you to simply normalize your CBV templates names.

TemplateNames mixin provides you implementation for get_template_names() which generates a tuple of templates names.

Templates names depends on app name and CBV object class name. This allows you to forget about manually editing the template_name variable every time and provides a standard automatic build of the template names.

Installation

The simplest way to install django-template-names is using pip:

pip install django-template-names

Usage

from template_names import TemplateNames

class Detail(TemplateNames, DetailView):
    ...
    pass

See tests.py for more insight.

Developer

Alexandr Shurigin (phpdude)

You can’t perform that action at this time.