Ejemplo n.º 1
0
class CommentController(MasterController):

    _comment = None
    
    def __init__(self, comments = None):
        self._comment = Comment()
        super(CommentController, self).__init__()

    def create(self, args):
        self._comment.attach(PostController)

        self._comment.user_id(args['user_id'])
        self._comment.post_id(args['post_id'])
        self._comment.comment(args['comment'])
        self._comment.save()