from tastypie.resources import ModelResource
from models import Event

from mozcal.base.serializers import MozcalSerializer


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

    serializer = MozcalSerializer(formats=['json', 'csv'])

from tastypie.resources import ModelResource
from models import Event

from mozcal.base.serializers import MozcalSerializer


class EventResource(ModelResource):
  class Meta:
    queryset = Event.objects.all()
    filtering = {
      "title": ('startswith',),
    }
    allowed_methods = ['get']
    include_resource_uri = False
    include_absolute_url = False

    serializer = MozcalSerializer(formats=['json', 'csv'])
Exclude uri fields from EventResource
Exclude uri fields from EventResource

  from tastypie.resources import ModelResource
  from models import Event
  
  from mozcal.base.serializers import MozcalSerializer
  
  
  class EventResource(ModelResource):
    class Meta:
      queryset = Event.objects.all()
      filtering = {
        "title": ('startswith',),
      }
      allowed_methods = ['get']
+     include_resource_uri = False
+     include_absolute_url = False
  
      serializer = MozcalSerializer(formats=['json', 'csv'])
- 
Exclude uri fields from EventResource
## Code Before:
from tastypie.resources import ModelResource
from models import Event

from mozcal.base.serializers import MozcalSerializer


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

    serializer = MozcalSerializer(formats=['json', 'csv'])

## Instruction:
Exclude uri fields from EventResource
## Code After:
from tastypie.resources import ModelResource
from models import Event

from mozcal.base.serializers import MozcalSerializer


class EventResource(ModelResource):
  class Meta:
    queryset = Event.objects.all()
    filtering = {
      "title": ('startswith',),
    }
    allowed_methods = ['get']
    include_resource_uri = False
    include_absolute_url = False

    serializer = MozcalSerializer(formats=['json', 'csv'])