X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fdjango-ldapdb.git;a=blobdiff_plain;f=ldapdb%2Frouter.py;fp=ldapdb%2Frouter.py;h=ba00631cb8b77af21cbc9c9fd61b556b008f4238;hp=5c3a6744c0581ecd0d4466d74ebc440fea33f4d9;hb=62d069c59b8ccea19532c7cda599af992b4c7ebe;hpb=4367cd65c6f0346a1f17acc19cbcefb92bcd3e44 diff --git a/ldapdb/router.py b/ldapdb/router.py index 5c3a674..ba00631 100644 --- a/ldapdb/router.py +++ b/ldapdb/router.py @@ -54,6 +54,12 @@ class Router(object): self.ldap_alias = alias break + def allow_syncdb(self, db, model): + "Do not create tables for LDAP models" + if is_ldap_model(model): + return db == self.ldap_alias + return None + def db_for_read(self, model, **hints): "Point all operations on LDAP models to the LDAP database" if is_ldap_model(model):