3👍
✅
Your QuerySet object is not request-scoped in Tastypie; it persists across requests. Thus your date.today is only evaluated once (even if you pass the date.today function as an argument instead of its return value), and not per request like you expect. Check out this recipe from the Tastypie docs for a fix.
1👍
Try this as your queryset value:
queryset = Event.objects.filter(status='P').exclude(date_end__lt=date.today)
- [Django]-Generating a date relative to another date in Django template
- [Django]-Delete parent object when child object is deleted in Django
Source:stackexchange.com