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.blockchainsetting import OWNER_KEY
|
||||||
from Blockchain2.block_user_info import user_info
|
from Blockchain2.block_user_info import user_info
|
||||||
from lpp.certificate.createCertificate import certificateGenrate
|
from lpp.certificate.createCertificate import certificateGenrate
|
||||||
|
from django.conf import settings
|
||||||
from MNF.settings import BasePath
|
from MNF.settings import BasePath
|
||||||
|
|
||||||
basePath = BasePath()
|
basePath = BasePath()
|
||||||
|
@ -488,7 +489,7 @@ class Conversion:
|
||||||
to = self.user.email
|
to = self.user.email
|
||||||
key_value = {
|
key_value = {
|
||||||
"User": self.user.username,
|
"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)
|
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_path"] = script_path1
|
||||||
script_json["script_file"] = hash2
|
script_json["script_file"] = hash2
|
||||||
script_json["type"] = "script-json"
|
script_json["type"] = "script-json"
|
||||||
|
script_json["screenplay_name"] = str(self.name_script)
|
||||||
scriptconversion["script-json"] = script_json
|
scriptconversion["script-json"] = script_json
|
||||||
print("blockchain script conversion 5.2")
|
print("blockchain script conversion 5.2")
|
||||||
|
|
||||||
|
@ -636,16 +638,23 @@ class Conversion:
|
||||||
print("Error:", e)
|
print("Error:", e)
|
||||||
|
|
||||||
print("blockchain script conversion 6")
|
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)
|
hash = hash_decrypation(hash)
|
||||||
to_email = [self.user.email]
|
to_email = [self.user.email]
|
||||||
email_code = 'BL1'
|
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 = {
|
key_value = {
|
||||||
"service": "script conversion",
|
"Product Name": "script conversion",
|
||||||
"hash": hash,
|
"Profile url": f"{settings.SITE_DOMAIN}/memberpage/#/personaldetails",
|
||||||
"public key": blockchain_obj.publicKey,
|
"User url": f"{settings.SITE_DOMAIN}/memberpage/#/user/{self.user.id}/personaldetails",
|
||||||
"private key": userkey.decode('utf-8'),
|
"Product output card url": f"{settings.SITE_DOMAIN}/conversion/view_conversion/",
|
||||||
"Transaction Hash": tx_id
|
|
||||||
}
|
}
|
||||||
sendmail(to_email=to_email, email_code=email_code,key_value=key_value, filePath=certificatepath)
|
sendmail(to_email=to_email, email_code=email_code,key_value=key_value, filePath=certificatepath)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in New Issue