Django Template Tags Placeholders

By Rich Jones

Extremely quick blog post!

Here's how to make a crude template tag which lets you add the HTML5 'placeholder' attribute to your form field inputs and textareas in a Django template.

Drop this in /yourproject/yourapp/templatetags/ as placeholder.py, and then use it like so:

 


Tada!


See More Posts About:

Django


Posted by Rich Jones

LinkedIn Website