How to filter Django model in html template?

  • 0
    Like this:

    {% if User.objects.filter(username = us) %}
        ........
    {% endif %}
    Django Evan May, Jun 5, 2020

  • 1 Answers
  • 0
    You don't need to do this, you already need to pass prepared data to the template.
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!