Skip to content

Filters to allow django template use of elements beginning with an underscore character.

License

Notifications You must be signed in to change notification settings

ambsw/django-underscore-filters

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-underscore-filters

These filters allow django template use of elements beginning with an underscore character.

Purpose

The sole purpose of these filters are to allow operations with template elements that naturally start with the underscore ('_') character.

Form Fields

Usage: field_

Example:

{{ form|field_:'_field_name' }}

Attributes

Usage: attr_

Example:

{{ my_tag|attr_:'_attr_name' }}

Dictionary Keys

Usage: dict_

Example:

{{ my_dict|dict_:'_key_name' }}

References

http://stackoverflow.com/questions/6676045/accessing-couchdbs-uuid-in-django-templates http://stackoverflow.com/questions/13693888/accessing-dict-elements-with-leading-underscores-in-django-templates

About

Filters to allow django template use of elements beginning with an underscore character.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%