def write_key(request):
    response = None
    try:
        token = request.GET['bearer_token']
        scope = "funf_write"
        scope = AccessRange.objects.get(key="funf_write")
        authenticator = Authenticator(scope=scope)
        try:
            # Validate the request.
            authenticator.validate(request)
        except AuthenticationException:
            # Return an error response.
            return authenticator.error_response(content="You didn't authenticate.")
        profile = authenticator.user.get_profile()
        profile.funf_password = json.loads(request.raw_post_data)['key']
        profile.save()
        response_content = json.dumps({'status':'success'})
        response = HttpResponse(content=response_content)        
    except Exception as ex:
        print "EXCEPTION:"
        print ex
        response = HttpResponseBadRequest('failed to write funf key')
    return response
Delete a property
dataset/ETHPy150Open HumanDynamics/openPDS/openpds/connectors/funf/views.py/write_key--crossover with--dataset/ETHPy150Open jakev/dtf/src/dtf/properties.py/del_prop