How to create a Django queryset filter comparing two date fields in the same model

This page summarizes the projects mentioned and recommended in the original post on /r/codehunter

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Django

    The Web framework for perfectionists with deadlines.

  • class Activity(models.Model): # Last time entry / metric was updated in the Activity model database updated = models.DateTimeField( verbose_name="CRUD date") # When it was added to Solr Index Date added_toSolr_date = models.DateTimeField(blank=True, null=True, verbose_name="Added to Solr Index Date") I referenced Django Query docs:https://docs.djangoproject.com/en/1.4/ref/models/querysets/And unit tests for samples:https://github.com/django/django/blob/master/tests/modeltests/or_lookups/tests.py

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts