def read(self, request, title=None): """ Returns a blogpost, if `title` is given, otherwise all the posts. Parameters: - `title`: The title of the post to retrieve. """ #base = Blogpost.objects base = Blogpost() base.title = 'abc' base.content = 'def' if title: #return base.get(title=title) return base else: return base