# Path: lepo/handlers.py
# class CRUDModelHandler(
#     ModelHandlerCreateMixin,
#     ModelHandlerReadMixin,
#     ModelHandlerUpdateMixin,
#     ModelHandlerDeleteMixin,
# ):
#     pass
# 
# Path: lepo_tests/models.py
# class Pet(models.Model):
#     name = models.CharField(max_length=128)
#     tag = models.CharField(max_length=128, blank=True)
# 
# Path: lepo_tests/schemata.py
# class PetSchema(Schema):
#     id = fields.Integer(required=False)
#     name = fields.Str(required=True)
#     tag = fields.Str(required=False)


from functools import reduce
from django.db.models import Q
from lepo.handlers import CRUDModelHandler
from lepo_tests.models import Pet
from lepo_tests.schemata import PetSchema
"""
Class-based implementation of the pet resource.
"""





class PetHandler(CRUDModelHandler):
    model = Pet

# Path: lepo/handlers.py
# class CRUDModelHandler(
#     ModelHandlerCreateMixin,
#     ModelHandlerReadMixin,
#     ModelHandlerUpdateMixin,
#     ModelHandlerDeleteMixin,
# ):
#     pass
# 
# Path: lepo_tests/models.py
# class Pet(models.Model):
#     name = models.CharField(max_length=128)
#     tag = models.CharField(max_length=128, blank=True)
# 
# Path: lepo_tests/schemata.py
# class PetSchema(Schema):
#     id = fields.Integer(required=False)
#     name = fields.Str(required=True)
#     tag = fields.Str(required=False)


# Path: lepo_tests/handlers/pets_cb.py
from functools import reduce
from django.db.models import Q
from lepo.handlers import CRUDModelHandler
from lepo_tests.models import Pet
from lepo_tests.schemata import PetSchema

"""
Class-based implementation of the pet resource.
"""





class PetHandler(CRUDModelHandler):
    model = Pet

    queryset = Pet.objects.all()