try:
userObject = models.User.objects.get(name=userName)
except models.User.DoesNotExist:
response_data['result'] = '0'
return HttpResponse(json.dumps(response_data), content_type="application/json")
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/16590.html