'Add a new bookmark for the current user.
Points at ``project``, ``version``, ``page``, and ``url``.'

def post(self, request, *args, **kwargs):

    post_json = json.loads(request.body)
    try:
        project_slug = post_json['project']
        version_slug = post_json['version']
        page_slug = post_json['page']
        url = post_json['url']
    except KeyError:
        return HttpResponseBadRequest(content=json.dumps({'error': 'Invalid    parameters'}))
    try:
        project = Project.objects.get(slug=project_slug)
        version = project.versions.get(slug=version_slug)
    except ObjectDoesNotExist:
        return HttpResponseBadRequest(content=json.dumps({'error': 'Project    or    Version    does    not    exist'}))
    Bookmark.objects.get_or_create(user=request.user, url=url, project=project, version=version, page=page_slug)
    return HttpResponse(json.dumps({'added': True}), status=201, content_type='application/json')
