Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Django Placeholder Template Tag
from django.template import Library
import re
register = Library()
def placeholder(value, token):
value.field.widget.attrs["placeholder"] = token
return value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment