How to write orm query?

User don't have any leave between two dates in django ?

leave_data =
EmployeeLeaves.objects.filter(~Q(approval_status='Approved'),~Q(approval_status='Cancelled'),~Q(approval_status='Rejected'),

 from_date__gte=month_first_date, to_date__lte=month_last_day,
                                                   employee=request.user)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMCU6CqyQeOn1O%2B0LHHbphHBqHDDYbSWa0msn5%3DJigi6WF1t%2BQ%40mail.gmail.com.

Reply via email to