externalconversion
This commit is contained in:
parent
eedb360e8c
commit
9f2aae5930
|
@ -32,6 +32,7 @@ from Blockchain2.Conversion import UploadConversionData, getConversion, deleteCo
|
|||
from Blockchain2.blockchainsetting import OWNER_KEY
|
||||
from Blockchain2.block_user_info import user_info
|
||||
from lpp.certificate.createCertificate import certificateGenrate
|
||||
from django.conf import settings
|
||||
from MNF.settings import BasePath
|
||||
|
||||
basePath = BasePath()
|
||||
|
@ -488,7 +489,7 @@ class Conversion:
|
|||
to = self.user.email
|
||||
key_value = {
|
||||
"User": self.user.username,
|
||||
"title": self.original_script_object.script_title
|
||||
"Title": self.original_script_object.script_title
|
||||
}
|
||||
sendmail(to_email=[to], email_code="PP18", key_value=key_value)
|
||||
|
||||
|
@ -610,6 +611,7 @@ class Conversion:
|
|||
script_json["script_file_path"] = script_path1
|
||||
script_json["script_file"] = hash2
|
||||
script_json["type"] = "script-json"
|
||||
script_json["screenplay_name"] = str(self.name_script)
|
||||
scriptconversion["script-json"] = script_json
|
||||
print("blockchain script conversion 5.2")
|
||||
|
||||
|
@ -636,16 +638,23 @@ class Conversion:
|
|||
print("Error:", e)
|
||||
|
||||
print("blockchain script conversion 6")
|
||||
certificatepath = certificateGenrate(self.user.username, "script conversion", hash)
|
||||
# certificatepath = certificateGenrate(self.user.username, "script conversion", hash)
|
||||
certificatepath = certificateGenrate(self.user.username, "script conversion", hash, projectname=self.name_script, matic = tx_gas_fee)
|
||||
hash = hash_decrypation(hash)
|
||||
to_email = [self.user.email]
|
||||
email_code = 'BL1'
|
||||
# key_value = {
|
||||
# "service": "script conversion",
|
||||
# "hash": hash,
|
||||
# "public key": blockchain_obj.publicKey,
|
||||
# "private key": userkey.decode('utf-8'),
|
||||
# "Transaction Hash": tx_id
|
||||
# }
|
||||
key_value = {
|
||||
"service": "script conversion",
|
||||
"hash": hash,
|
||||
"public key": blockchain_obj.publicKey,
|
||||
"private key": userkey.decode('utf-8'),
|
||||
"Transaction Hash": tx_id
|
||||
"Product Name": "script conversion",
|
||||
"Profile url": f"{settings.SITE_DOMAIN}/memberpage/#/personaldetails",
|
||||
"User url": f"{settings.SITE_DOMAIN}/memberpage/#/user/{self.user.id}/personaldetails",
|
||||
"Product output card url": f"{settings.SITE_DOMAIN}/conversion/view_conversion/",
|
||||
}
|
||||
sendmail(to_email=to_email, email_code=email_code,key_value=key_value, filePath=certificatepath)
|
||||
except Exception as e:
|
||||
|
|
Loading…
Reference in New Issue