forked from DGNum/gestioCOF
Remove accidentally merged file
This commit is contained in:
parent
0162f431d4
commit
704731addd
2 changed files with 1 additions and 28 deletions
|
@ -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',
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue