[Answered ]-'custom_filters' is not a valid tag library

1👍

Template tags folder must be beside of templates folder, views.py, models.py, …

 //Don't forget also to put __init__.py outside the templatetags,

 @register.simple_tag
 def ownership(project, user):
     return project.added_by_user == user

1👍

If your App name is MyApp and your tag folder name is templatetags then in settings.py you should have :

INSTALLED_APPS = [
'MyApp',
'MyApp.templatetags'

]

Both your app and your tag folder which is under your app package
Django Project are needed there.

-> MyApp
    ---> models.py
    ---> views.py
    ---> templatetags
      -----> __init__.py
      -----> app_filters.py

Leave a comment