projects
/
matthijs
/
upstream
/
django-ldapdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
declare connection features
[matthijs/upstream/django-ldapdb.git]
/
ldapdb
/
__init__.py
diff --git
a/ldapdb/__init__.py
b/ldapdb/__init__.py
index db0e25e9d5417cd9301ddd4e7cb74367a0e3c2e7..f466bea042775db05af17b11cac52939b195b1d5 100644
(file)
--- a/
ldapdb/__init__.py
+++ b/
ldapdb/__init__.py
@@
-21,7
+21,7
@@
import ldap
from django.conf import settings
import ldap
from django.conf import settings
-from django.db.backends import BaseDatabaseOperations
+from django.db.backends import BaseDatabase
Features, BaseDatabase
Operations
def convert(field, value, func):
if not value or field == 'jpegPhoto':
def convert(field, value, func):
if not value or field == 'jpegPhoto':
@@
-41,6
+41,9
@@
def escape_ldap_filter(value):
.replace(')', '\\29') \
.replace('\0', '\\00')
.replace(')', '\\29') \
.replace('\0', '\\00')
+class DatabaseFeatures(BaseDatabaseFeatures):
+ pass
+
class DatabaseOperations(BaseDatabaseOperations):
def quote_name(self, name):
return name
class DatabaseOperations(BaseDatabaseOperations):
def quote_name(self, name):
return name
@@
-50,6
+53,7
@@
class LdapConnection(object):
self.connection = ldap.initialize(server)
self.connection.simple_bind_s(bind_dn, bind_password)
self.charset = "utf-8"
self.connection = ldap.initialize(server)
self.connection.simple_bind_s(bind_dn, bind_password)
self.charset = "utf-8"
+ self.features = DatabaseFeatures()
self.ops = DatabaseOperations()
def add_s(self, dn, modlist):
self.ops = DatabaseOperations()
def add_s(self, dn, modlist):