from tastypie.resources import ModelResource
from models import Event


class EventResource(ModelResource):
  class Meta:
    queryset = Event.objects.all()

from tastypie.resources import ModelResource
from models import Event


class EventResource(ModelResource):
  class Meta:
    queryset = Event.objects.all()
    filtering = {
      "title": ('startswith',),
    }
Allow filtering of event by title
Allow filtering of event by title

  from tastypie.resources import ModelResource
  from models import Event
  
  
  class EventResource(ModelResource):
    class Meta:
      queryset = Event.objects.all()
- 
+     filtering = {
+       "title": ('startswith',),
+     }
Allow filtering of event by title
## Code Before:
from tastypie.resources import ModelResource
from models import Event


class EventResource(ModelResource):
  class Meta:
    queryset = Event.objects.all()

## Instruction:
Allow filtering of event by title
## Code After:
from tastypie.resources import ModelResource
from models import Event


class EventResource(ModelResource):
  class Meta:
    queryset = Event.objects.all()
    filtering = {
      "title": ('startswith',),
    }