Skip to main content

Django generic views with PascalCase template paths with model named folders.

Project description

Django generic views with PascalCase template paths with model named folders.

https://github.com/wooyek/django-pascal-templates

https://img.shields.io/travis/wooyek/django-pascal-templates.svg https://img.shields.io/coveralls/wooyek/django-pascal-templates.svg https://img.shields.io/pypi/v/django-pascal-templates.svg?maxAge=2592000 https://img.shields.io/pypi/dm/django-pascal-templates.svg?maxAge=2592000

Usage

Replace your usual generic view imports with:

from pascal_templates.views import DetailView, CreateView, UpdateView, DeleteView, ListView

And in result get additional template_names allowing you to keep templates in folders named after your models:

names = [
   'some_app/somemodel_detail.html',
   'some_app/SomeModel/detail.html',   # This is what you get
 ]

In effect you can use a nice folder structure with templates that are easy to manage:

templates
├── SomeModel
   ├── detail.html
   ├── form.html
   └── list.html
├── SomeOtherModel
   ├── detail.html
   ├── form.html
   └── list.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-pascal-templates-0.8.13.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file django-pascal-templates-0.8.13.tar.gz.

File metadata

File hashes

Hashes for django-pascal-templates-0.8.13.tar.gz
Algorithm Hash digest
SHA256 b27322a01c3861ae7bb10ae6f43078126dadfadf04a1c25923df0125f557d518
MD5 bfda8d0b06619a272ff1075908375997
BLAKE2b-256 558d8e4a258f142630b5162bf57caf6254248a27f0cc014b532f1cbbea50506a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page