title: How do I create a date range filter in a class based view?
body: <h3>My class based view in &quot;views.py&quot;</h3>
  <pre><code>class PostListView(ListView):
      model = Post.objects.filter(created__range=[&quot;2020-03-09&quot;, &quot;2020-03-31&quot;])
      template_name = 'main/problems.html'
      context_object_name = 'posts'
      ordering = ['-created']
  </code></pre>
  <p>I have a variable &quot;created&quot; for when the post is created but dont know how to filter the post within a range.</p>