示例#1
0
def index(request):
    return Ok({"echo-response": request.body["echo"]}, headers={"Content-Type": "application/json"})
示例#2
0
def detail(request, index):
    if len(database) > index:
        return Ok(database[index], mimetype="application/json")
    else:
        return NotFound()
示例#3
0
def list(request):
    return Ok(database, mimetype="application/json")
def index(request):
    return Ok(request.new_data)
示例#5
0
def hello(request):
    return Ok("Hello World!")
示例#6
0
def index(request):
    return Ok("Index")
示例#7
0
def index(request):
    return Ok("Hello World!")
示例#8
0
def index(request):
    value = request.session.get('value', 0)
    request.session['value'] = value + 1
    return Ok(request.session, headers={"Content-Type": "application/json"})