title: How can I check if an user is superuser in django
body: <p>I'm listing registered users on a ListView page and I'm trying to show if user is superuser or not.</p>
  <p>My main user is created with &quot;manage.py createsuperuser&quot; command and I'm sure it is a superuser beacuse I've checked from admin panel too.</p>
  <p>When I try to print if it is superuser or not my code always shows a &quot;False&quot; output. Here are my codes:</p>
  <p>views.py</p>
  <pre><code>@method_decorator(staff_member_required, name='dispatch')
  class Uyeler(ListView):
  
      model = User
      paginate_by = 40
      ordering = ['-pk']
      template_name = &quot;panel/uyeler.html&quot;
  </code></pre>
  <p>and in template file:</p>
  <pre><code>  {% for obj in object_list %} 
  
                        
                      {% if obj.is_superuser %}SuperUser {% else %} Not SuperUser {{ obj.is_superuser }} {%endif%}
  
  {% endfor %
  </code></pre>
  <p>And my html output is &quot;Not SuperUser False&quot; for all users including my superuser account. Any ideas?</p>