'filters' is not a registered tag library
<p>I have an issue regarding template filter. I have used <strong>django allauth</strong> for user registration. I have edited its signup.html and used loop to iterate over the fields to show them dynamically. I could show the fields but could not define the type field. </p>

<p>What i did is </p>

<p><strong>account/signup.html</strong></p>

<pre><code>{% load filters %}
&lt;form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}"&gt;
    {% csrf_token %}
    {% for field in forms.visible_fields %}
        &lt;input type="{{ field.field.widget|input_type}}" name="{{ field.name }}" id="{{ field.id_for_label}}" class="form-control"&gt;
    {% endfor %}
&lt;/form&gt;
</code></pre>

<p><strong>template filter inside main app(filters.py)</strong></p>

<pre><code>from django import template
register = template.Library()

@register.filter('input_type')
def input_type(ob):
    return ob.__class__.__name__
</code></pre>

<p><strong>templates location</strong></p>

<pre><code>'DIRS': [os.path.join(BASE_DIR, 'templates')
</code></pre>

<p>As i am using django allauth where should i place my template filter code? Sign up form to extend the allauth form using first name and last name is inside main app.</p>

<p>The tag library should be placed in a <code>templatetags</code> directory in the root directory of the app:</p>

<p>See code layout from the <a href="https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/#code-layout" rel="nofollow">docs</a>:</p>

<blockquote>
  <p>When a Django app is added to <code>INSTALLED_APPS</code>, any tags it defines in
  the conventional location described below are automatically made
  available to load within templates.</p>
  
  <p>The app should contain a <code>templatetags</code> directory, at the same level as
  <code>models.py</code>, <code>views.py</code>, etc. If this doesnât already exist, create it -
  donât forget the <code>__init__.py</code> file to ensure the directory is treated
  as a Python package.</p>
</blockquote>

python django python-3.x django-allauth