TemplateSyntaxError at /admin/userauths/profile/add/

Sorry, no. This is an error in the template having nothing to do with any of your models. What does the phrase “Invalid filter” mean?

meaning no attributes in the template

Not quite. An “Invalid filter” in this case means that this filter doesn’t exist.

See:

okay so what should i do to avoid the problem

Fix the offending template.

please where should i fix it

You’ve got a couple different options here.

This is a template being rendered by the admin, which means the default template is probably being overridden by jazzmin

This means that you could do any of these:

  • Create your own admin template to override what jazzmin provides. (See Overriding admin templates).
  • Go in to jazzmin directly and fix the template in it.
  • Get rid of jazzmin
  • Implement your own length_is filter.
  • Downgrade to Django 5.0 until jazzmin is brought up-to-date.

It’s your decision which approach to take.

go in to jazzmin directly and fix the template in it
how am i suppose to do that

and how can i downgrade to django 5.0

Find the proper template file and edit it. (You’ve installed it using pip, right? This means that it’s going to be in your site-packages directory for your virtual environment.)

The cleaner way (but a bit more work) would be for you to fork the package and create the fix in your fork.

To install any specific version of any package, specify the version number. (e.g. pip install 'Django==5.1')

please help me implement my own length_is filter

The easiest way would be to look at how it’s implemented in Django 5.0.

i have downloaded django 5.0.1 so please what next

Read the docs at How to create custom template tags and filters | Django documentation | Django. Use the information there as a guide to finding where the filter definition would be stored in Django itself, then apply the knowledge gained from that to create your own filter definition in your project.

if i download django 5.0 should i implement the length_is filter

thank you very much really appreciate

This pull request helped Update fieldset.html by hamed-jamali-software · Pull Request #589 · farridav/django-jazzmin · GitHub