from flask.ext.restful import Resource, marshal


class BasicResource(Resource):

    def __init__(self):
        super(BasicResource, self).__init__()

    def response(self, data, code):
        return marshal(data, self.fields), code

from flask.ext.restful import Resource, marshal, reqparse


class BasicResource(Resource):

    def __init__(self):
        super(BasicResource, self).__init__()
        self.parser = reqparse.RequestParser()

    def response(self, data, code):
        return marshal(data, self.fields), code

Add parser to basic resource
Add parser to basic resource

- from flask.ext.restful import Resource, marshal
+ from flask.ext.restful import Resource, marshal, reqparse
  
  
  class BasicResource(Resource):
  
      def __init__(self):
          super(BasicResource, self).__init__()
+         self.parser = reqparse.RequestParser()
  
      def response(self, data, code):
          return marshal(data, self.fields), code
  
Add parser to basic resource
## Code Before:
from flask.ext.restful import Resource, marshal


class BasicResource(Resource):

    def __init__(self):
        super(BasicResource, self).__init__()

    def response(self, data, code):
        return marshal(data, self.fields), code

## Instruction:
Add parser to basic resource
## Code After:
from flask.ext.restful import Resource, marshal, reqparse


class BasicResource(Resource):

    def __init__(self):
        super(BasicResource, self).__init__()
        self.parser = reqparse.RequestParser()

    def response(self, data, code):
        return marshal(data, self.fields), code
