1👍
You can retrieve the User
s for which there is no RdpUserPasswordHash
for the last 90 days with:
from datetime import timedelta
from django.utils.timezone import now
User.objects.exclude(password_hash__when__gte=now() - timedelta(days=90))
Source:stackexchange.com