

from piston.handler import BaseHandler
from portal import models


class RepositoryHandler(BaseHandler):
    model = models.Repository


class CollectionHandler(BaseHandler):
    model = models.Collection


class PlaceHandler(BaseHandler):
    model = models.Place


class ContactHandler(BaseHandler):
    model = models.Contact


class AuthorityHandler(BaseHandler):
    model = models.Authority





from piston.handler import BaseHandler
from portal import models

class ResourceHandler(BaseHandler):
    model = models.Resource

class RepositoryHandler(BaseHandler):
    model = models.Repository


class CollectionHandler(BaseHandler):
    model = models.Collection


class PlaceHandler(BaseHandler):
    model = models.Place


class ContactHandler(BaseHandler):
    model = models.Contact


class AuthorityHandler(BaseHandler):
    model = models.Authority



Add an (unexposed) ResourceHandler so inheriting objects serialise better
Add an (unexposed) ResourceHandler so inheriting objects serialise better

  
  
  from piston.handler import BaseHandler
  from portal import models
  
+ class ResourceHandler(BaseHandler):
+     model = models.Resource
  
  class RepositoryHandler(BaseHandler):
      model = models.Repository
  
  
  class CollectionHandler(BaseHandler):
      model = models.Collection
  
  
  class PlaceHandler(BaseHandler):
      model = models.Place
  
  
  class ContactHandler(BaseHandler):
      model = models.Contact
  
  
  class AuthorityHandler(BaseHandler):
      model = models.Authority
  
  
  
Add an (unexposed) ResourceHandler so inheriting objects serialise better
## Code Before:


from piston.handler import BaseHandler
from portal import models


class RepositoryHandler(BaseHandler):
    model = models.Repository


class CollectionHandler(BaseHandler):
    model = models.Collection


class PlaceHandler(BaseHandler):
    model = models.Place


class ContactHandler(BaseHandler):
    model = models.Contact


class AuthorityHandler(BaseHandler):
    model = models.Authority



## Instruction:
Add an (unexposed) ResourceHandler so inheriting objects serialise better
## Code After:


from piston.handler import BaseHandler
from portal import models

class ResourceHandler(BaseHandler):
    model = models.Resource

class RepositoryHandler(BaseHandler):
    model = models.Repository


class CollectionHandler(BaseHandler):
    model = models.Collection


class PlaceHandler(BaseHandler):
    model = models.Place


class ContactHandler(BaseHandler):
    model = models.Contact


class AuthorityHandler(BaseHandler):
    model = models.Authority


