Skip to content
Snippets Groups Projects

Adding json functions

Merged Ismail Moumni requested to merge Adding-Json-FUNCTIONS into master
Compare and Show latest version
5 files
+ 93
70
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -9,7 +9,7 @@ class NoPasswordDefineError(Exception):
pass
__rdos_password__ = "rdos2013"
__rdos_password__ = ""
# Procedures that returns an externally defined password to conect to the database
@@ -40,14 +40,14 @@ def database_connection():
return mydb
def update_database(url: str, job_id: str, before: str, after: str):
def update_database(u: str, job_id: str, before: str, after: str):
database = database_connection()
mycursor = database.cursor(buffered=False)
with open('../database/templates/update_success.txt', 'r') as file:
update = file.read()
update = update.replace('{{before}}', before).replace('{{after}}', after)
update = update.replace('{{url}}', url)
update = update.replace('{{u}}', u)
update = update.replace('{{job_id}}', job_id)
print(update)
Loading