password encrapt daoru
This commit is contained in:
parent
18362bbeec
commit
306a5d8497
|
@ -8,6 +8,7 @@ import base64
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
import qrcode
|
import qrcode
|
||||||
import os
|
import os
|
||||||
|
from django.contrib.auth.hashers import make_password
|
||||||
|
|
||||||
def makeqr(data):
|
def makeqr(data):
|
||||||
upload_folder = 'media/qr_equipment'
|
upload_folder = 'media/qr_equipment'
|
||||||
|
@ -311,6 +312,7 @@ def drusers(companyid,path):
|
||||||
a.empid = empid
|
a.empid = empid
|
||||||
a.username = username
|
a.username = username
|
||||||
a.password = '0000'
|
a.password = '0000'
|
||||||
|
a.epassword = make_password('0000')
|
||||||
a.ubelongpart = Partment.objects.get(partid=partdict[partname])
|
a.ubelongpart = Partment.objects.get(partid=partdict[partname])
|
||||||
a.usecomp = Partment.objects.get(partid=companyid)
|
a.usecomp = Partment.objects.get(partid=companyid)
|
||||||
a.save()
|
a.save()
|
||||||
|
|
Loading…
Reference in New Issue