title: Check if text exists in Django template context variable
body: <p>This may not be the best way of doing this (open to suggestions). But I want to display a button on my home page depending on the value of a Boolean in the custom user model.
  I am passing the value of this boolean via context in the view. But I can't seem to get the template logic to work.</p>
  
  <p><strong>Models.py</strong></p>
  
  <pre><code>from django.contrib.auth.models import AbstractUser
  
  class CustomUser(AbstractUser):
      isAdmin = models.BooleanField(default = False,)
      #more models...
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.views.generic import TemplateView
  from django.contrib.auth import get_user_model
  from accounts.models import CustomUser
  
  class HomePageView(TemplateView):
      template_name = 'home.html'
  
      def get_context_data(self, **kwargs):
          context = super(HomePageView, self).get_context_data(**kwargs)
          if self.request.user.is_authenticated:
              adminStatus = CustomUser.objects.get(id=self.request.user.id)
              print(adminStatus.isAdmin)
              context['adminStatus'] = str(adminStatus.isAdmin)
              return context
  </code></pre>
  
  <p><strong>home page template.html</strong></p>
  
  <pre><code>{% extends 'base.html' %}
    {% block body %}
  
    {% if user.is_authenticated %}
      &lt;h4&gt;Hi {{ user.username }}!&lt;/h4&gt;
      &lt;a class="btn btn-primary btn-lg" href="{% url 'dashboard' %}" role="button"&gt; Go to Dashboard&lt;/a&gt;
    {% else %}
      &lt;p&gt;You are not logged in&lt;/p&gt;
      &lt;a href="{% url 'login' %}"&gt;login&lt;/a&gt;
    &lt;/div&gt;
      {% if adminStatus == "True" %}
      &lt;h1&gt;test&lt;/h1&gt;
      &lt;div class = "adminPanel"&gt;
        &lt;a class="btn btn-primary btn-lg" href="{% url 'newEquipment' %}" role="button"&gt; add new equipment&lt;/a&gt;
      &lt;/div&gt;
      {% endif %}
    {% endif %}
  {% endblock %}
  </code></pre>
  
  <p>I can't see the "newEquipment" button even though the adminStatus context is equal to "True", as verified by the print() command.
  I have a feeling my template logic is not correct. I also tried:</p>
  
  <pre><code>{% if adminStatus contains "True" %}
  </code></pre>