title: In Django {% if user.is_autenticated %} is not working
body: <p>I made in Django a login system and it's not working the  {% if user.is_autenticated %} method in html files. It always work as &quot;not logged in&quot;, also when I'm logged in, I dont understand the problem. Can someone help me pease? Thanks for any help support
  This is my code:</p>
  <p><strong>Views.py</strong></p>
  <pre><code># Form Post 
  class EditView(ListView):
      model = Article
      form_class = ArticleForm
      template_name = 'blog/form_post/index.html'
      ordering = ['-data']
  
  class AddPostView (CreateView): # Create new Post
      model = Article
      form_class = ArticleForm
      template_name = 'blog/form_post/add_post.html'
  
  class EditPostView(UpdateView): # Edit a post
      model = Article
      form_class = ArticleForm
      template_name = 'blog/form_post/edit_post.html'
  
  class DeletePostView(DeleteView):
      model = Article
      template_name = 'blog/form_post/delete.html'
      success_url = reverse_lazy('EditHome')
  # Login 
  def Slogin(request):
      if request.method == 'POST':
          username = request.POST.get('username')
          password = request.POST.get('password')
          user = authenticate(request, username = username, password = password)
          if user is not None:
              login(request, user)
              return redirect('EditHome')
          else:
              messages.info(request, 'Error')
      context = {}
      return render(request,'blog/form_post/Slogin.html' )
  ...
  </code></pre>
  <p><strong>Html login File</strong></p>
  <pre><code>{% extends 'blog/form_post/layout.html' %}
  {% block title %} LogIn{% endblock title %}
  {% block content %}
  
    &lt;form method=&quot;POST&quot; action=&quot;&quot; class=&quot; form__group&quot;&gt;
    &lt;h3 id=&quot;form-title&quot; class=&quot;m-3 violet &quot;&gt;LOGIN&lt;/h3&gt;
      {% csrf_token %}
  
      &lt;input type=&quot;text&quot; name=&quot;username&quot; placeholder=&quot;Username...&quot; class=&quot;w-75 m-3 border-top-0 border-left-0 border-right-0 bg-white&quot;&gt;
  
      &lt;input type=&quot;password&quot; name=&quot;password&quot; placeholder=&quot;Password...&quot; class=&quot;w-75 m-3 border-top-0 border-left-0 border-right-0 bg-white&quot;&gt; &lt;br&gt;
      &lt;button class=&quot;edit__button btn w-25 m-3&quot; &gt;Login&lt;/button&gt;
  
    &lt;/form&gt;
  
  
  
    {% for message in messages %}
   &lt;h2 class=&quot;m-3 red&quot;&gt;{{ message }}&lt;/h2&gt;
    {% endfor %}
  
  {% endblock content %}
  </code></pre>
  <p><strong>html &quot;index&quot; file</strong></p>
  <pre><code>{% extends 'blog/form_post/layout.html' %}
  {% block title %} DashBoard{% endblock title %}
  {% block content %}
  
  {% if user.is_autenticated %}
  code...
     {% else %}
     &lt;p&gt;You're not Admin&lt;/p&gt;
  {% endif %}
  {% endblock content %}
  </code></pre>