X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=ldapdb%2Fbackends%2Fldap%2Fbase.py;h=79d937fe0d23114f6ea7abf6977bbc942451d8c1;hb=bc299bd4085d3c5878ebd2151dcb85f0fa17014c;hp=99b27285ca37e792d9e7bca094922cef8ba7827a;hpb=2b6d4fd9fdce937989b577311b6b985077819c2e;p=matthijs%2Fupstream%2Fdjango-ldapdb.git diff --git a/ldapdb/backends/ldap/base.py b/ldapdb/backends/ldap/base.py index 99b2728..79d937f 100644 --- a/ldapdb/backends/ldap/base.py +++ b/ldapdb/backends/ldap/base.py @@ -35,6 +35,22 @@ import ldap from django.db.backends import BaseDatabaseFeatures, BaseDatabaseOperations, BaseDatabaseWrapper +from django.db.backends.creation import BaseDatabaseCreation + +class DatabaseCreation(BaseDatabaseCreation): + def create_test_db(self, verbosity=1, autoclobber=False): + """ + Creates a test database, prompting the user for confirmation if the + database already exists. Returns the name of the test database created. + """ + pass + + def destroy_test_db(self, old_database_name, verbosity=1): + """ + Destroy a test database, prompting the user for confirmation if the + database already exists. Returns the name of the test database created. + """ + pass class DatabaseCursor(object): def __init__(self, ldap_connection): @@ -45,6 +61,8 @@ class DatabaseFeatures(BaseDatabaseFeatures): self.connection = connection class DatabaseOperations(BaseDatabaseOperations): + compiler_module = "ldapdb.backends.ldap.compiler" + def quote_name(self, name): return name @@ -53,12 +71,16 @@ class DatabaseWrapper(BaseDatabaseWrapper): super(DatabaseWrapper, self).__init__(*args, **kwargs) self.charset = "utf-8" + self.creation = DatabaseCreation(self) self.features = DatabaseFeatures(self) self.ops = DatabaseOperations() def close(self): pass + def _commit(self): + pass + def _cursor(self): if self.connection is None: self.connection = ldap.initialize(self.settings_dict['NAME'])