Hello everyone,
I’m facing an issue with my Django project on Heroku that I can’t seem to resolve. The project works perfectly fine locally, but when I deploy it to Heroku and try to access the admin page for adding a new user (/admin/auth/user/add
), I get the following error:
Details:
- 1. Project Name: NyumbaChap
- 2. Django Version: Django==5.1.1
- 3. Heroku Stack: heroku-22
- Error Message: invalid filter length_is : fieldset.html
The issue seems to stem from the Jazzmin package, specifically from a template located in fieldset.html
, which is using the length_is
filter. I’ve made sure that everything is correctly set up, and I’ve fixed this locally, but on Heroku, it still throws the same error.
What I’ve Tried:
- Checked that the template files are included in my project structure.
- Verified that the
TEMPLATES
setting in mysettings.py
is correctly configured. - Ensured that I have run migrations and set environment variables on Heroku
Traceback summary
TemplateSyntaxError at /admin/auth/user/add/
Invalid filter: ‘length_is’
Request Method: GET
Request URL: https://myambachap1-e021394fbadd.herokuapp.com/admin/auth/user/add/
Django Version: 5.1.1
Exception Type: TemplateSyntaxError
Exception Value: Invalid filter: "length_is
Exception Location: /app/heroku/python/lib/python3.12/site-packages/django/template/base.py, line 611, in find_filter
Raised during: django.contrib.auth.admin.add_view
- Has anyone else encountered this issue with Heroku deployments?
- Are there any additional steps or configurations I might be missing?