Django Custom Filter Registration

I wrestled with this one for about an hour last night before realizing it was rather simple. Following the instructions to create a custom template filter, I thought everything was simple and made since until when I tried to load the page to test it.

The page spewed a stack trace telling me that it couldn't find the custom filter I was trying lo load with:

{% load website.app.custom_filters %}
{% filter htmlcompress %}
    ...
{% endfilter %}

I then realized that I had registered it like so:

# website/app/template_tags/custom_filters.py
from django import template
register = template.Library()


@register.filter("htmlcompress")

It seems that there is some magic that occurs that loads the custom_filters.py module in a global namespace so that doing this in my base template works:

{% load custom_filters %}
{% filter htmlcompress %}
    ...
{% endfilter %}

Thought I'd post this in case I am not the only new person to django wrestling with this.