I’m looking out to advert a situation into an html mannequin in Django (python) and it is no longer working:

Right here’s my HTML:

                    

{{ submit.author }}

{% if submit.author == 'John_Woo' %}

NOK

{% else %}

sufficient

{% endif %}

Now not definite what’s inappropriate here…
Regardless that I accept as true with a John_Woo author, I perfect receive sufficient message

Right here’s my gadgets.py:

class Publish(gadgets.Model):
    title = gadgets.CharField(max_length=200, distinctive=Precise)
    slug = gadgets.SlugField(max_length=200, distinctive=Precise)
    author = gadgets.ForeignKey(User, on_delete= gadgets.CASCADE,related_name='blog_posts')

Right here’s my views.py:

from django.views import generic
from .gadgets import Publish

class PostList(generic.ListView):
    queryset = Publish.objects.filter(scheme=1).order_by('-created_on')
    template_name = 'index.html'

class PostDetail(generic.DetailView):
    mannequin = Publish
    template_name = 'post_detail.html'

requested 24 mins ago