title: How can I refresh the queryset when using the browser's "back button?"
body: <p>I'm using django to build a simple website and in part of it a message can be clicked on and marked as read which also pulls up a detail page with the message title and body. When I press the back button, however, it still leaves it as unread until I refresh the page. I've checked the sqlite file and it does show it as read already (I'm using a simple boolean field), but it doesn't on the page until it's refreshed.</p>
  
  <p>I have tried refreshing the page to make sure that the field has the correct value, but I'm not sure where to go from here.</p>
  
  <p>The section of my code that takes the user to the message detail page is as follows:</p>
  
  <pre><code>def messages(request):
      user = request.user
      sent_messages = Message.objects.filter(sender=user.id)
      unread_messages = Message.objects.filter(recipient=user.id, read=0)
      read_messages = Message.objects.filter(recipient=user.id, read=1)
      context = {
          'sent_messages': sent_messages,
          'unread_messages': unread_messages,
          'read_messages': read_messages,
      }
      return render(request, 'messenger/messages.html', context)
  </code></pre>
  
  <p>It should automatically send the message to the unread section on the page, but it won't do that unless the page is explicitly reloaded.</p>