I am attempting to filter users by a custom field in each users profile called profile. This field is called level and is an integer between 0-3.
If I filter using e
Less than or equal:
User.objects.filter(userprofile__level__lte=0)
Greater than or equal:
User.objects.filter(userprofile__level__gte=0)
Likewise, lt for less than and gt for greater than. You can find them all in the documentation.
lt
gt