some fix
This commit is contained in:
parent
0c84e8133a
commit
9a4a71b152
|
|
@ -8,7 +8,7 @@ import pickle
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
from datetime import date, datetime, timedelta
|
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
|
@ -45,6 +45,7 @@ from .safespider import getAqzs, getTzzs
|
||||||
from .tasks import (gettime, send_wechatmsg, send_wechatmsgs, updateAqzs,
|
from .tasks import (gettime, send_wechatmsg, send_wechatmsgs, updateAqzs,
|
||||||
updateTzzs, yjjs, yjjs_gc, yjjs_px, yjjs_ws, yjjs_yl)
|
updateTzzs, yjjs, yjjs_gc, yjjs_px, yjjs_ws, yjjs_yl)
|
||||||
|
|
||||||
|
from datetime import date, datetime, timedelta
|
||||||
logger = logging.getLogger('log')
|
logger = logging.getLogger('log')
|
||||||
|
|
||||||
# 分页功能
|
# 分页功能
|
||||||
|
|
@ -3942,7 +3943,7 @@ def apimiss(req):
|
||||||
startnum, endnum = fenye(req)
|
startnum, endnum = fenye(req)
|
||||||
a = Miss.objects.filter(usecomp=Partment.objects.get(
|
a = Miss.objects.filter(usecomp=Partment.objects.get(
|
||||||
partid=companyid), deletemark=1)
|
partid=companyid), deletemark=1)
|
||||||
if req.GET.get('missqy'):
|
if req.GET.get('missqy', None):
|
||||||
a = a.filter(missqy__id=req.GET.get('missqy'))
|
a = a.filter(missqy__id=req.GET.get('missqy'))
|
||||||
a = a.order_by('-misstime')
|
a = a.order_by('-misstime')
|
||||||
total = a.count()
|
total = a.count()
|
||||||
|
|
@ -5003,7 +5004,6 @@ def apitool(req):
|
||||||
print(str(num) + obj.examtest.name + obj.user.name + '得分' + str(score))
|
print(str(num) + obj.examtest.name + obj.user.name + '得分' + str(score))
|
||||||
return JsonResponse({"code":1})
|
return JsonResponse({"code":1})
|
||||||
elif a == 'correct_aqzs':
|
elif a == 'correct_aqzs':
|
||||||
from .tasks import updateAqzs
|
|
||||||
updateAqzs()
|
updateAqzs()
|
||||||
return JsonResponse({"code":1})
|
return JsonResponse({"code":1})
|
||||||
elif a == 'correct_ljzg':
|
elif a == 'correct_ljzg':
|
||||||
|
|
@ -6560,7 +6560,6 @@ def apitrain(req):
|
||||||
res = exportxlsx('grpxjl', a)
|
res = exportxlsx('grpxjl', a)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
from groups import models as g_models
|
|
||||||
|
|
||||||
|
|
||||||
def apiquestioncat(req):
|
def apiquestioncat(req):
|
||||||
|
|
@ -7808,7 +7807,6 @@ def companyinfo(req):
|
||||||
# return redirect('/withmenu/', html="companyinfo.html")
|
# return redirect('/withmenu/', html="companyinfo.html")
|
||||||
# return HttpResponseRedirect("/withmenu/?html=companyinfo.html")
|
# return HttpResponseRedirect("/withmenu/?html=companyinfo.html")
|
||||||
return JsonResponse({'code': 1})
|
return JsonResponse({'code': 1})
|
||||||
from django.forms import model_to_dict
|
|
||||||
companyinfo_form = forms.CompanyInfoForm(model_to_dict(companyinfo))
|
companyinfo_form = forms.CompanyInfoForm(model_to_dict(companyinfo))
|
||||||
return render(req, 'companyinfo.html',
|
return render(req, 'companyinfo.html',
|
||||||
{'companyinfo': companyinfo_form})
|
{'companyinfo': companyinfo_form})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue