title: How to show incremented Django model field value in template correctly?
body: <p>I have a post model and try to achieve properly views counter but this method not work correctly in template when I try to display views counter in a template.</p>
  
  <pre><code>    class Post(models.Model):
      category = models.ForeignKey(Category, on_delete=models.PROTECT)
      title = models.CharField(max_length=160)
      slug = models.SlugField(null=True, blank=True, max_length=160)
      content = models.TextField()
      created = models.DateTimeField(default=datetime.datetime.now, blank=True)
      updated = models.DateTimeField(auto_now=True)
      photo = models.ImageField(upload_to='news/photos/', default='', blank=True)
      views = models.PositiveIntegerField(default=0)
  
      class Meta:
          verbose_name = 'Post'
          verbose_name_plural = 'News'
          ordering = ['id']
  
      def __str__(self):
          return self.title
  
      def save(self, *args, **kwargs):
          self.slug = slugify(self.title)
          return super(Post, self).save(*args, **kwargs)
  
      def count_views(self):
          self.views = F('views') + 1
          self.save()
  
  
  class PostDetail(DetailView):
  model = Post
  template_name = 'news/detail.html'
  
  def get_context_data(self, **kwargs):
      context = super(PostDetail, self).get_context_data(**kwargs)
      self.object.count_views()
      context['latest_news'] = Post.objects.all().order_by('-created')[0:10]
      return context
  
  &lt;span&gt;&lt;i class="icon-eye icons"&gt;&lt;/i&gt; {{ post.views }}&lt;/span&gt;
  </code></pre>
  
  <p>There may be another method to solve this issue, more correct. Can i solve this with .update queryset? </p>