Skip to content

Instantly share code, notes, and snippets.

@brunomichetti
Created September 7, 2022 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunomichetti/d0d5430bc8b0181acdb2ea0a7fa103f3 to your computer and use it in GitHub Desktop.
Save brunomichetti/d0d5430bc8b0181acdb2ea0a7fa103f3 to your computer and use it in GitHub Desktop.
queryset = User.objects.filter(name__startswith="John")
queryset = queryset.filter(created_at__lte=datetime.date.today())
queryset = queryset.exclude(is_staff=False) print(queryset)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment