diff --git a/README b/README index e2d5581..18e3f9b 100644 --- a/README +++ b/README @@ -1,2 +1,4 @@ Le serveur a besoin des droits en écriture sur la base SQLite3 et le répertoire la contenant. + +Histoire : bbc -> lhark -> guimoz diff --git a/roulette.py b/roulette.py index 16daa64..efd6630 100644 --- a/roulette.py +++ b/roulette.py @@ -58,8 +58,8 @@ def connect_sqlite(): def init_db(): # Initialisation de la base SQLite with closing(connect_sqlite()) as con_sqlite: - with app.open_resource('schema.sql') as f: - con_sqlite.cursor().executescript(f.read()) +with app.open_resource('schema.sql') as f: + con_sqlite.cursor().executescript(f.read().decode("utf-8")) con_sqlite.commit() # Connexion à la base SQLite locale @@ -76,6 +76,7 @@ def init_db(): where etat='STATE_ACTIVE' and ecole_id=1 and id<>1 and typeUtilisateur='membre'""") rows = cur_mysql.fetchall() + print('players :') for row in rows: if row['prenom'] + ' ' + row['nom'] in IMMUNITY: print(row) @@ -90,6 +91,7 @@ def init_db(): and utilisateurs.etat='STATE_ACTIVE' and equipements.etat='STATE_ACTIVE' and utilisateurs.typeUtilisateur='membre'""") rows = cur_mysql.fetchall() + print('machines :') for row in rows: print(row) cur_sqlite.execute("""insert into machines values (?,?,?)""", \ diff --git a/templates/home.html~ b/templates/home.html~ deleted file mode 100644 index 0708e74..0000000 --- a/templates/home.html~ +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -

24 heures

-

Toi aussi, joue au rézoman !

-

- Jusqu'à mercredi 9h, tu peux essayer de trancher tes - camarades pour 30 min. -

-

- Jouer -

-

Historique personnel

- -{% if bans_hist != [] %} - -{% else %} -

- Rien pour l'instant -

-{% endif %} -{% endblock %} diff --git a/templates/not_subscribed.html~ b/templates/not_subscribed.html~ deleted file mode 100644 index 6c45143..0000000 --- a/templates/not_subscribed.html~ +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -

Vous n'êtes pas inscrits

-

- Si vous désirez participer malgré les risques que le jeu comporte, veuillez - envoyer un email à goulven.kermarec@supelec.fr . - (Vous ne pouvez pas jouer depuis Supélec) -

-{% endblock %}