|
@@ -194,19 +194,21 @@ class getAvatarView(TemplateView):
|
|
|
if os.path.isfile(fullPath):
|
|
|
try:
|
|
|
Imagedata = open(fullPath, 'rb').read()
|
|
|
- return HttpResponse(Imagedata, content_type="image/jpeg")
|
|
|
except Exception as e:
|
|
|
return response.json(906, repr(e))
|
|
|
+ else:
|
|
|
+ return HttpResponse(Imagedata, content_type="image/jpeg")
|
|
|
else:
|
|
|
print('----------------')
|
|
|
print(defaultPath)
|
|
|
print('----------------')
|
|
|
try:
|
|
|
Imagedata = open(defaultPath, 'rb').read()
|
|
|
- return HttpResponse(Imagedata, content_type="image/jpeg")
|
|
|
except Exception as e:
|
|
|
return response.json(906, repr(e))
|
|
|
- return response.json(907)
|
|
|
+ else:
|
|
|
+ return HttpResponse(Imagedata, content_type="image/jpeg")
|
|
|
+ # return response.json(907)
|
|
|
|
|
|
|
|
|
@csrf_exempt
|