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

Replace Admin.py

parent 1b1dd05d
...@@ -10,34 +10,14 @@ class Admin(SQL): ...@@ -10,34 +10,14 @@ class Admin(SQL):
# PROTECTED # PROTECTED
def _creation_bdd(self): def _creation_bdd(self):
try : self._execute_sql("../SQL/TABLE.sql")
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)
def _insertions_bdd(self): def _insertions_bdd(self):
try : self._execute_sql("../SQL/DATA.sql")
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)
def _suppression_bdd(self): def _suppression_bdd(self):
try : self._execute_sql("../SQL/DELETE.sql")
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)
......
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