def getPostArticle(request, postId): # postId = 1 test = PostsDataAccessLayer() post = test.getPosts([postId])[str(postId)] data = json.dumps(post.__dict__) res = HttpResponse(data, status=200, content_type='application/json') return res
def __init__(self): Thread.__init__(self) self.__postCollection = {} self.__postDal = PostsDataAccessLayer()