title: Django custom filter error. Returns "invalid filter"
body: <p>I've been trying to create this custom filter in Django, and I can't for the life of me make it work.</p>
  
  <p>in my templatetags folder I have the files <code>__init__.py</code> and <code>alcextra.py</code> in my template I first load the static files and then the templatetags. I've tried reseting the server and deleting and creating the files again.</p>
  
  <p><code>{% load staticfiles %} {% load alcextra %}</code>
  Which is then extended to my main html file. I have tried putting it in the main html file.</p>
  
  <p>in alcextra.py I have written</p>
  
  <pre><code>from django import template
  register = template.Library()
  
  @register.filter
  def multiply(value, arg):
      return value * arg
  </code></pre>
  
  <p>I have tried loads of different @register versions like</p>
  
  <p><code>@register.filter("multiply", multiply)
  @register.filter(name="multiply")
  @register.filter()
  @register.simple_tag(takes_context=True</code></p>
  
  <p>And all return the same error, invalid filter: 'multiply'. At this point I don't know what to do or what to try.</p>
  
  <p><a href="https://i.stack.imgur.com/lg6mZ.png" rel="noreferrer">Overview of the directory</a></p>
  
  <p>Edit: the template in question.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt; {% load staticfiles %} {% load alcextra %}
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;script src="../../static/javascript/jquery-3.2.1.js"&gt;&lt;/script&gt;
    &lt;link rel="stylesheet" href="{% static 'css/alcosearch.css' %}" /&gt;
    &lt;title&gt;Alcosearch&lt;/title&gt;
    &lt;meta charset="utf-8" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div class="pageheader"&gt;
      &lt;h1&gt;Alcosearch&lt;/h1&gt;
      &lt;h3&gt;Vinmonopol søk&lt;/h2&gt;
    &lt;/div&gt;
    &lt;div&gt;
      {% block content %} {% endblock %}
    &lt;/div&gt;
    &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>What is annoying is that I tried this in another project and it worked. So I'm not completely sure what I've done or not done.</p>
  
  <p>Edit 2:</p>
  
  <p>The answer is what @Alasdair said. I thought I could load the filter in the template and then use it somewhere else, which was not the case.</p>