password encrapt daoru

This commit is contained in:
caoqianming 2019-11-20 14:19:51 +08:00
parent 18362bbeec
commit 306a5d8497
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import base64
from django.conf import settings
import qrcode
import os
from django.contrib.auth.hashers import make_password
def makeqr(data):
upload_folder = 'media/qr_equipment'
@ -311,6 +312,7 @@ def drusers(companyid,path):
a.empid = empid
a.username = username
a.password = '0000'
a.epassword = make_password('0000')
a.ubelongpart = Partment.objects.get(partid=partdict[partname])
a.usecomp = Partment.objects.get(partid=companyid)
a.save()