|
@@ -126,8 +126,8 @@ class SuperPasswordView(View):
|
|
super_password_id = "super_password_%s" % userID
|
|
super_password_id = "super_password_%s" % userID
|
|
redisObj = RedisObject()
|
|
redisObj = RedisObject()
|
|
redis = redisObj.set_data(key=super_password_id, val=super_code, expire=86400)
|
|
redis = redisObj.set_data(key=super_password_id, val=super_code, expire=86400)
|
|
- if redis is False:
|
|
|
|
- return response.json(121)
|
|
|
|
|
|
+ # if redis is False:
|
|
|
|
+ # return response.json(121)
|
|
device_super_password_qs.update(status=status)
|
|
device_super_password_qs.update(status=status)
|
|
if lang == 'en':
|
|
if lang == 'en':
|
|
msg = "Your authorization code is " + super_code + ",valid within 24 hours"
|
|
msg = "Your authorization code is " + super_code + ",valid within 24 hours"
|
|
@@ -184,7 +184,8 @@ class SuperPasswordView(View):
|
|
'status',
|
|
'status',
|
|
'buyTime',
|
|
'buyTime',
|
|
'hint',
|
|
'hint',
|
|
- 'lang')
|
|
|
|
|
|
+ 'lang',
|
|
|
|
+ 'userID__username')
|
|
device_super_password_qs = device_super_password_qs.order_by('-addTime')[
|
|
device_super_password_qs = device_super_password_qs.order_by('-addTime')[
|
|
(page - 1) * line:page * line]
|
|
(page - 1) * line:page * line]
|
|
return response.json(0, {'list': list(device_super_password_qs), 'count': count})
|
|
return response.json(0, {'list': list(device_super_password_qs), 'count': count})
|