title: How to compare two dates (not time) in django-python project?
body: <p>Here It is my function to print the previous(oldTickets) and upcoming(newTickets) bookings.<br>
  <strong>journeyDate</strong> is database attribute(column name) which is of type <strong>date</strong> and <strong>ticketDetail</strong> is model name. <br>
  Here It is showing error in comparing date attributes.</p>
  <pre><code>def booking(request):
      if request.user.is_authenticated:
          user_name = request.user.username
          today = date.today()
          oldTickets = ticketDetail.objects.all()
          oldTickets = ticketDetail.objects.filter(userName=user_name).filter(ticketDetail.journeyDate&lt;today)
          newTickets = ticketDetail.objects.all()
          newTickets = ticketDetail.objects.filter(userName=user_name).filter(ticketDetail.journeyDate&gt;today)
          context = {'oldticket':oldTickets, 'newticket':newticket}
          return render(request, 'bookticket/myBookings.html', context)
      else:
          return redirect('/login')
  </code></pre>
  <p>Can anyone guide me, how to solve this error?<br>
  Thank You :)</p>