Commit 28bdbcdb authored by Daniel STAN's avatar Daniel STAN

prises: no more routage

parent aa938d78
......@@ -63,7 +63,7 @@ CUSTOM_HEADERS = {
class Prise(models.Model):
class Meta:
db_table = "prises"
#db_table = "prises"
ordering = ["batiment", "chambre"]
permissions = (
("can_view", "Peut visualiser les prises"),
......@@ -209,7 +209,7 @@ reversion.register(Prise)
class PriseAutorise(models.Model):
class Meta:
db_table = "prises_autorise"
#db_table = "prises_autorise"
unique_together = (('prise', 'aid'),)
# Caca
......
......@@ -15,7 +15,6 @@ except ImportError:
if not settings.DEBUG:
raise
asterisk_reload_conf = asterisk_reload_conf_debug
from django.db import models
from django.contrib.auth.models import User
......@@ -92,7 +91,7 @@ class Profile(models.Model):
except self.DoesNotExist:
return True
return not getattr(self, field) == old_value
modules={}
for module in asterisk_conf['modules'].keys():
modules[module]=reduce( # List.fold_left
......
......@@ -28,27 +28,27 @@ class Router(object):
def db_for_read(self, model, **hints):
"""Base de données à utiliser pour la lecture"""
if model._meta.app_label == "prises":
return "switchs"
#if model._meta.app_label == "prises":
# return "switchs"
return None
def db_for_write(self, model, **hints):
"""Base de données à utiliser pour l'écriture"""
if model._meta.app_label == "prises":
return "switchs"
#if model._meta.app_label == "prises":
# return "switchs"
return None
def allow_syncdb(self, db, model):
"""Autoriser l'écriture du modèle donné dans la base de données ?"""
if db == "switchs":
if model._meta.app_label == "prises":
return True
return False
else:
if model._meta.app_label == "prises":
return False
#if db == "switchs":
# if model._meta.app_label == "prises":
# return True
# return False
#else:
# if model._meta.app_label == "prises":
# return False
return None
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