views.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:Location_Assistance 作者: KamalAwasthi 项目源码 文件源码
def search(request):
    current_username=request.POST.get('username')
    try:
        user=User.objects.get(username=current_username)
        python_object = {'flag':'True',
                        'userName': user.username,
                        'first_name': user.first_name,
                        'last_name': user.last_name}
    except Exception as e:
        python_object = {'flag':'False'}
    datatosend=json.JSONEncoder().encode(python_object)
    return HttpResponse(datatosend)

#views for save_settings table
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号