refacto: db path in config files
This commit is contained in:
parent
07e2bb4e3e
commit
a47c5df213
3 changed files with 16 additions and 12 deletions
|
@ -12,6 +12,7 @@ Created on Sun Mar 25 18:20:49 2018
|
|||
# * vérifier les eval et les types donnés
|
||||
|
||||
from cineclubBlogSQ import filmSQ as f
|
||||
from config import dump_path, db_path
|
||||
import sqlite3
|
||||
|
||||
DEBUG = True
|
||||
|
@ -53,11 +54,11 @@ class FilmInterface():
|
|||
print("\nLe film couramment chargé est", self.filmCharge.nom, "\n")
|
||||
|
||||
def initBDD(self):
|
||||
fichier = open("../db/dumpFile", "r")
|
||||
fichier = open(dump_path, "r")
|
||||
instruction = fichier.read()
|
||||
fichier.close()
|
||||
|
||||
conn = sqlite3.connect('../db/baseFilms.db')
|
||||
conn = sqlite3.connect(db_path)
|
||||
c = conn.cursor()
|
||||
c.executescript(instruction)
|
||||
conn.commit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue