Commit e70caf59 authored by Francois Mares's avatar Francois Mares
Browse files

Replace Admin.py

parent 1b1dd05d
......@@ -10,34 +10,14 @@ class Admin(SQL):
# PROTECTED
def _creation_bdd(self):
try :
connexion = self._connexion()
cur = connexion.cursor()
cur.execute(open("../SQL/TABLE.sql", "r").read())
connexion.commit()
return
except psycopg2.Error as e:
print("Message système :", e)
self._execute_sql("../SQL/TABLE.sql")
def _insertions_bdd(self):
try :
connexion = self._connexion()
cur = connexion.cursor()
cur.execute(open("../SQL/DATA.sql", "r").read())
connexion.commit()
return
except psycopg2.Error as e:
print("Message système :", e)
self._execute_sql("../SQL/DATA.sql")
def _suppression_bdd(self):
try :
connexion = self._connexion()
cur = connexion.cursor()
cur.execute(open("../SQL/DELETE.sql", "r").read())
connexion.commit()
return
except psycopg2.Error as e:
print("Message système :", e)
self._execute_sql("../SQL/DELETE.sql")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment