title: Passing a date to a queryset based on a button click in Django
body: <p>I have RoastManifest View that querys date_scheduled (field from my RoastManifest model) and returns distinct values.  I pass that queryset to a template and loop over the values and present them as buttons on the HTML file.  I am able to click any button and pass the corresponding date into the URL,((localhost/schedule/2019-06-20) when I click on the June, 20 2019 button) thus redirecting me to my RoastManifestDetailView.  Now I want to be able to filter my RoastManifestDetailView based only on the date passed to the URL (or which date button was clicked).</p>
  
  <p>I have tried <code>RoastManifest.obejects.filter(date_scheduled__date=date.today())</code>just to see if I could return anything schedule for today but I keep getting Fielderrors (Unsupported lookup 'date' for DateField or join on the field not permitted.).  Please note I know that is not the exact queryset for me.  I wish to pass in a variable into the queryset.</p>
  
  <p>This is the model: 
  (NOTE: roast_order is in there only to allow for use of adminsortable2 library)</p>
  
  <pre><code>class RoastManifest(models.Model):
      def batch_number_incrementer():
          current_max = RoastManifest.objects.order_by('-batch_number').first()
          if current_max:
              return current_max.batch_number + 1
          else:
              return 8000000
      batch_number = models.IntegerField(unique=True,
                                         default=batch_number_incrementer,
                                         )
      product = models.ForeignKey(Product, related_name="products",
                                  on_delete=models.PROTECT)
      date_scheduled = models.DateField()
      roaster_profile = models.ForeignKey(RoasterProfile,
                                          on_delete=models.PROTECT)
      roast_order = models.PositiveSmallIntegerField(default=0, blank=False, null=False)
  
      class Meta:
          ordering = ('roast_order',)
  </code></pre>
  
  <p>This is how I pull the individual days scheduled:</p>
  
  <pre><code>class RoastManifestListView(ListView):
      model = RoastManifest
      template_name = 'schedule/scheduled_days.html'
  
      def get_context_data(self, **kwargs):
          context = super().get_context_data(**kwargs)
          context['days'] = RoastManifest.objects.order_by('date_scheduled').values('date_scheduled').distinct()
          return context
  </code></pre>
  
  <p>This is the view I am having trouble with:</p>
  
  <pre><code>class RoastManifestDetailView(TemplateView):
      template_name = 'schedule/roastmanifest_list.html'
  
      def get_context_data(self, **kwargs):
          context = super().get_context_data(**kwargs)
          context["roasts"] = RoastManifest.objects.get(date_scheduled__date=date.today())
          return context
  </code></pre>
  
  <p>I want to be able to click on a day (button) and pass that date into the query, thus returning everything scheduled for that specific day.</p>
  
  <p>With the above RoastManifestDetailView I am currently getting a FieldError</p>