Django 1.11 built-in and custom widget template locations

Viewed 1247

I am trying to write a custom widget the "new way" with Django 1.11's new form/widget rendering functionality, and am very confused due to the lack of examples and well, lacking documentation:

From the Django docs:

Each widget has a template_name attribute with a value such as input.html. Built-in widget templates are stored in the django/forms/widgets path. You can provide a custom template for input.html by defining django/forms/widgets/input.html, for example.

I am unclear on the location it is referring to. Does this mean in my venv/lib/python2.7/site-packages/django/forms/ directory, I'm supposed to create a new directory called widgets/ and put my templates there? Because that makes no sense. Or am I supposed to create the django/forms/widgets/ directory under my project directory and put my new templates there?

1 Answers
Related