title: Django user.is_staff not working
body: <p>i am in trouble with my django projet.</p>
  
  <p>I would like to do that only staff user can see a link (href) in a template.</p>
  
  <p>The template in which is the code bellow is the template base.html that I take in my other templates.</p>
  
  <p>here is the header of base.html</p>
  
  <pre><code>&lt;header class="header"&gt;
  &lt;img src="{% static 'img/headerWAI.jpg' %}" alt="HeaderWai jpg" class="headerimg" /&gt;
  &lt;h1 class="headerText"&gt;Waste Annotation Image&lt;/h1&gt;
  &lt;p class="usermenu"&gt;
    {% block loginuser %}
      {% if user.is_authenticated %}
        Hello {{ user.username }}!
        &lt;p&gt;&lt;a class="loginlink" href="{% url 'logout' %}"&gt;logout&lt;/a&gt;
        {% if user.is_staff %}
          &lt;a href="{% url 'newimage' %}"&gt;manage image&lt;/a&gt;&lt;/p&gt;
        {% endif %}
        {% else %}
        &lt;p&gt;You are not logged in : &lt;a href="{% url 'login' %}"&gt;login&lt;/a&gt;&lt;/p&gt;
      {% endif %}
    {% endblock %}
  &lt;/p&gt;
  </code></pre>
  
  <p>
  user.if_authenticatted work correctly but 3 lines bellow, user.is_staff not work.</p>
  
  <p>Out of 5 test users, only 2 have the boolean at True as staff. But when I am connect with a non-staff user, he has the link. I don't understand why?</p>
  
  <p>Maybe i have forgot an import or something in the settings.py</p>
  
  <p>my settings.py here : <a href="https://github.com/HE-Arc/WasteAnnotationImage/blob/master/wasteannotationimage/wasteannotationimage/settings.py" rel="nofollow noreferrer">https://github.com/HE-Arc/WasteAnnotationImage/blob/master/wasteannotationimage/wasteannotationimage/settings.py</a></p>
  
  <p>Any suggestion ?</p>
  
  <p>PS: i am a beginner in django</p>