Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eclecticmiraclecat/fc1194216e3ac1353a657bc3f6c6be95 to your computer and use it in GitHub Desktop.
Save eclecticmiraclecat/fc1194216e3ac1353a657bc3f6c6be95 to your computer and use it in GitHub Desktop.
$ ls cbvApp/templatetags/
custFilters.py  __init__.py
from django import template
register = template.Library()

@register.filter(name='extradash')
def extra_dash(value):
  result = value + ' -------'
  return result
<!-- index.html -->
{% load custFilters %}

{{ student.firstName | extradash}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment