<s> from __future__ import absolute_import <EOL> from flask_restful . reqparse import RequestParser <EOL> from changes . api . base import APIView <EOL> from changes . models . task import Task <EOL> import uuid <EOL> class TaskIndexAPIView ( APIView ) : <EOL> get_parser = RequestParser ( ) <EOL> get_parser . add_argument ( '<STR_LIT>' , type = uuid . UUID , default = None ) <EOL> def get ( self ) : <EOL> args = self . get_parser . parse_args ( ) <EOL> queryset = Task . query . order_by ( Task . date_created . desc ( ) ) <EOL> if args . object_id : <EOL> queryset = queryset . filter ( Task . task_id == args . object_id ) <EOL> return self . paginate ( queryset ) </s>
