证书只显示月份
This commit is contained in:
parent
4677027bc6
commit
15f024bf1a
|
|
@ -140,7 +140,7 @@
|
|||
class="inner-cell" data-tag="idtype">身份证</span>:<span contenteditable="false"
|
||||
class="inner-cell" data-tag="idno">{{candidate.ID_number}}</span>,于
|
||||
<!-- <span contenteditable="false" class="inner-cell" data-tag="examyear">2021</span>年 -->
|
||||
<span contenteditable="false" class="inner-cell" data-tag="exammonth">{{candidate.examtest_date|date}}</span>参加
|
||||
<span contenteditable="false" class="inner-cell" data-tag="exammonth">{{candidate.exam_year}}年{{candidate.exam_month}}月</span>参加
|
||||
<span contenteditable="false"
|
||||
class="inner-cell" data-tag="pworktype">{{candidate.workscope_name}}</span> 辐射安全与防护考核,成绩合格。</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -682,12 +682,14 @@ from django.shortcuts import render
|
|||
from django.http import Http404
|
||||
def candidate(request):
|
||||
if request.GET.get('id', None):
|
||||
try:
|
||||
# try:
|
||||
candidate = Candidate.objects.get(id=request.GET.get('id'), number__isnull=False)
|
||||
candidate.msg = get_msg_from_id(candidate.ID_number)
|
||||
candidate.exam_year = candidate.examtest_date.year
|
||||
candidate.exam_month = candidate.examtest_date.month
|
||||
return render(request, 'index.html', {"candidate":candidate})
|
||||
except:
|
||||
raise Http404
|
||||
# except:
|
||||
# raise Http404
|
||||
raise Http404
|
||||
|
||||
def get_msg_from_id(id_number):
|
||||
|
|
|
|||
Loading…
Reference in New Issue