blockchain certifcate, custom_runserver changes and conversion existing juggernaut error resolved
This commit is contained in:
		
							parent
							
								
									e49f9e249d
								
							
						
					
					
						commit
						52102bea51
					
				| 
						 | 
				
			
			@ -57,7 +57,7 @@ def run_conversion(msg):
 | 
			
		|||
        "original_script_id": translated_script.script_link_id.script_id,
 | 
			
		||||
        "translated_script_id": translated_script.translation_id,
 | 
			
		||||
        "sample_id": body_dict.get('sample_id', None),
 | 
			
		||||
        "existing_script": body_dict.get('sample_id', None),
 | 
			
		||||
        "existing_script": body_dict.get('existing_script', None),
 | 
			
		||||
        "iteration_no": body_dict.get('iteration_no', None),
 | 
			
		||||
        "juggernaut_pages_deduction": body_dict.get("juggernaut_pages_deduction", None),
 | 
			
		||||
        "language_set": body_dict.get("language_set", None),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -461,6 +461,8 @@ class Conversion:
 | 
			
		|||
                                conversion_pages=self.juggernaut_pages_deduction,
 | 
			
		||||
                                associated_project=self.original_script_object,
 | 
			
		||||
                                translation_language=self.language_set)
 | 
			
		||||
                self.original_script_object = MNFScriptDatabase.objects.get(
 | 
			
		||||
                    script_id=conversion_params['original_script_id'])
 | 
			
		||||
                self.original_script_object.is_juggernaut_used = True
 | 
			
		||||
                # if script_original.languages_juggernaut != "":
 | 
			
		||||
                #     # script_original.languages_juggernaut = str(script_original.languages_juggernaut) + "," + str(
 | 
			
		||||
| 
						 | 
				
			
			@ -644,7 +646,10 @@ class Conversion:
 | 
			
		|||
    
 | 
			
		||||
 | 
			
		||||
        """Process Completed"""
 | 
			
		||||
        self.translated_script_object = ScriptTranslations.objects.get(
 | 
			
		||||
            translation_id=self.translated_script_object.translation_id)
 | 
			
		||||
        self.translated_script_object.status = "Completed"
 | 
			
		||||
        
 | 
			
		||||
        try:
 | 
			
		||||
            self.translated_script_object.blockchain_txhash = tx_id
 | 
			
		||||
            self.translated_script_object.translated_script_pdf = s3_url
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,7 +51,7 @@ def certificateGenrate(name,file_from,Hash,projectname="NAN",matic=0):
 | 
			
		|||
        'enable-local-file-access': ''
 | 
			
		||||
    }
 | 
			
		||||
    pdfkit.from_string(
 | 
			
		||||
        html, f'{basepath}/lpp/certificate/certificate.pdf', options=options)
 | 
			
		||||
        html, f'{basepath}/lpp/certificate/certificate.pdf', options=options,verbose=True)
 | 
			
		||||
    return f'{basepath}/lpp/certificate/certificate.pdf'
 | 
			
		||||
 | 
			
		||||
# certificateGenrate("pravesh yadav","PPT Conversiom", "qwefgfdsdfgdsdcvxs")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,14 +15,14 @@
 | 
			
		|||
   
 | 
			
		||||
   <body style="margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif;font-size: 16px;">
 | 
			
		||||
       <div style="max-width: 90vw; box-shadow: 0px 4px 27px 0px #00000040; margin: 16px auto;">
 | 
			
		||||
           <img src="/home/ubuntu/Conversion_Kitchen_Code/kitchen_counter/media/HeaderImageCertificate.png" style="width: 100%;">
 | 
			
		||||
           <img src="/home/ubuntu/Conversion_Kitchen_Code/kitchen_counter/static/media/HeaderImageCertificate.png" style="width: 100%;">
 | 
			
		||||
           <table style="border-collapse: collapse;
 | 
			
		||||
           display: flex;
 | 
			
		||||
           justify-content: center;
 | 
			
		||||
           margin: 0px 0 50px 0px">
 | 
			
		||||
               <tr>
 | 
			
		||||
                   <td rowspan="4" style="text-align: center;">
 | 
			
		||||
                       <img src="/home/ubuntu/Conversion_Kitchen_Code/kitchen_counter/media/verticalLineGolden.png" alt="v-line" style="height: 300px;
 | 
			
		||||
                       <img src="/home/ubuntu/Conversion_Kitchen_Code/kitchen_counter/static/media/verticalLineGolden.png" alt="v-line" style="height: 300px;
 | 
			
		||||
                       width: 30px; 
 | 
			
		||||
                       position: relative;
 | 
			
		||||
                       top: -70px; padding: 0 20px;">
 | 
			
		||||
| 
						 | 
				
			
			@ -36,7 +36,7 @@
 | 
			
		|||
                       </h2>
 | 
			
		||||
                   </td>
 | 
			
		||||
                   <td rowspan="4" style="text-align: center;">
 | 
			
		||||
                       <img src="/home/ubuntu/Conversion_Kitchen_Code/kitchen_counter/media/verticalLineGolden.png" alt="v-line" style="height: 300px;
 | 
			
		||||
                       <img src="/home/ubuntu/Conversion_Kitchen_Code/kitchen_counter/static/media/verticalLineGolden.png" alt="v-line" style="height: 300px;
 | 
			
		||||
                       width: 30px; 
 | 
			
		||||
                       position: relative;
 | 
			
		||||
                       top: 70px; padding: 0 20px;">
 | 
			
		||||
| 
						 | 
				
			
			@ -124,7 +124,7 @@
 | 
			
		|||
               <tr>
 | 
			
		||||
                   <td style="padding-left: 90px ; display: flex; justify-content: space-evenly;">
 | 
			
		||||
                       <div style="margin-left: -100px;">
 | 
			
		||||
                           <img src="/home/ubuntu/Conversion_Kitchen_Code/kitchen_counter/media/DoogleFilm.png" alt="doodle" style="width: 144.7px;
 | 
			
		||||
                           <img src="/home/ubuntu/Conversion_Kitchen_Code/kitchen_counter/static/media/DoogleFilm.png" alt="doodle" style="width: 144.7px;
 | 
			
		||||
                           height: 121.06px;">
 | 
			
		||||
                       </div>
 | 
			
		||||
                       <div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue