From 704731addd8637a5a2bef809c30eb698e66ecffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Thu, 26 Oct 2017 13:37:04 +0200 Subject: [PATCH] Remove accidentally merged file --- gestioCOF/settings/common.py | 2 +- gestion/shared.py | 27 --------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 gestion/shared.py diff --git a/gestioCOF/settings/common.py b/gestioCOF/settings/common.py index fc9f1def..52aaf103 100644 --- a/gestioCOF/settings/common.py +++ b/gestioCOF/settings/common.py @@ -192,7 +192,7 @@ CAS_EMAIL_FORMAT = "%s@clipper.ens.fr" AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', - 'gestion.shared.COFCASBackend', + 'gestion.backends.COFCASBackend', 'kfet.auth.backends.GenericBackend', ) diff --git a/gestion/shared.py b/gestion/shared.py deleted file mode 100644 index 39bc5da7..00000000 --- a/gestion/shared.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Locking/unlocking tools to prevent tables to be corrupted -""" - -from django.db import connection - - -def lock_table(*models): - query = "LOCK TABLES " - for i, model in enumerate(models): - table = model._meta.db_table - if i > 0: - query += ", " - query += "%s WRITE" % table - cursor = connection.cursor() - cursor.execute(query) - row = cursor.fetchone() - return row - - -def unlock_tables(*models): - cursor = connection.cursor() - cursor.execute("UNLOCK TABLES") - row = cursor.fetchone() - return row - -unlock_table = unlock_tables