Slide 66
Slide 66 text
Add filtering
from django.contrib.auth.models import User
from tastypie.authentication import BasicAuthentication
from tastypie.resources import ModelResource, ALL
class UserResource(ModelResource):
class Meta:
# What was there before...
filtering = {
‘username’: ALL,
‘date_joined’: [‘range’, ‘gt’, ‘gte’, ‘lt’, ‘lte’],
}