def post(self, request, *args, **kwargs):
        content = request.POST.get('content', '')
        markup = request.POST.get('markup')
        reader = get_reader(markup=markup)
        content_body, metadata = reader(content).read()
        image_id = metadata.get('image', '')
        try:
            image_url = EntryImage.objects.get(id=int(image_id)).image.url
        except (EntryImage.DoesNotExist, __HOLE__):
            image_url = ''

        context = {
            'content': content_body,
            'title': metadata.get('title'),
            'tags': list(metadata.get('tags', [])),
            'image_url': image_url
        }

        return self.render_to_response(context)
dataset/ETHPy150Open gkmngrgn/radpress/radpress/views.py/PreviewView.post