

def post_api(request):
    username = request.POST.get('username', '')
    try:
        user = User.objects.get(username=username)
    except User.DoesNotExist:
        return HttpResponse('Invalid username')
    if (not user.check_password(request.POST.get('password', ''))):
        return HttpResponse('Invalid password')
    message = username.POST.get('message', '').strip()
    if (not message):
        return HttpResponse('Invalid message')
    Blast.objects.create(user=user, message=message, extended=request.POST.get('extended', ''), short=request.POST.get('short', ''))
    return HttpResponse('Message saved')

dataset/ETHPy150Open simonw/bugle_project/bugle_project/bugle/views.py post_api/VarMisuse@86/108 `request`->`username`