from aiohttp.web import Response
from zope.interface import Attribute
from zope.interface import Interface


class ITodo(Interface):
    title = Attribute("""Title""")
    done = Attribute("""Done""")


class View(object):
    def __init__(self, context, request):
        self.context = context
        self.request = request

    async def __call__(self):
        return Response(text='Hello World!')

from aiohttp.web import Response
from plone.supermodel import model
from zope import schema


class ITodo(model.Schema):
    title = schema.TextLine(title=u"Title",
                            required=False)
    done = schema.Bool(title=u"Done",
                       required=False)


class View(object):
    def __init__(self, context, request):
        self.context = context
        self.request = request

    async def __call__(self):
        return Response(text='Hello World!')

Use supermodel/zope.schema for Todo field definition
Use supermodel/zope.schema for Todo field definition

  from aiohttp.web import Response
- from zope.interface import Attribute
- from zope.interface import Interface
+ from plone.supermodel import model
+ from zope import schema
  
  
- class ITodo(Interface):
-     title = Attribute("""Title""")
-     done = Attribute("""Done""")
+ class ITodo(model.Schema):
+     title = schema.TextLine(title=u"Title",
+                             required=False)
+     done = schema.Bool(title=u"Done",
+                        required=False)
  
  
  class View(object):
      def __init__(self, context, request):
          self.context = context
          self.request = request
  
      async def __call__(self):
          return Response(text='Hello World!')
  
Use supermodel/zope.schema for Todo field definition
## Code Before:
from aiohttp.web import Response
from zope.interface import Attribute
from zope.interface import Interface


class ITodo(Interface):
    title = Attribute("""Title""")
    done = Attribute("""Done""")


class View(object):
    def __init__(self, context, request):
        self.context = context
        self.request = request

    async def __call__(self):
        return Response(text='Hello World!')

## Instruction:
Use supermodel/zope.schema for Todo field definition
## Code After:
from aiohttp.web import Response
from plone.supermodel import model
from zope import schema


class ITodo(model.Schema):
    title = schema.TextLine(title=u"Title",
                            required=False)
    done = schema.Bool(title=u"Done",
                       required=False)


class View(object):
    def __init__(self, context, request):
        self.context = context
        self.request = request

    async def __call__(self):
        return Response(text='Hello World!')
