https://github.com/phpdude/django-template-names
Django Templates Names by @phpdude
https://github.com/phpdude/django-template-names
Last synced: about 1 year ago
JSON representation
Django Templates Names by @phpdude
- Host: GitHub
- URL: https://github.com/phpdude/django-template-names
- Owner: phpdude
- Created: 2015-04-21T04:53:12.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-05-07T16:30:52.000Z (about 9 years ago)
- Last Synced: 2025-03-24T10:48:27.210Z (about 1 year ago)
- Language: Python
- Size: 3.91 KB
- Stars: 58
- Watchers: 6
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- Changelog: CHANGELOG.markdown
Awesome Lists containing this project
README
# [Django Template Names](https://github.com/phpdude/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](https://github.com/phpdude/))