git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@872
e071eeec-0327-468d-9b6a-
08194a12b294
import ldap
from django.conf import settings
import ldap
from django.conf import settings
+from django.db.backends import BaseDatabaseOperations
def convert(field, value, func):
if not value or field == 'jpegPhoto':
def convert(field, value, func):
if not value or field == 'jpegPhoto':
.replace(')', '\\29') \
.replace('\0', '\\00')
.replace(')', '\\29') \
.replace('\0', '\\00')
+class DatabaseOperations(BaseDatabaseOperations):
+ def quote_name(self, name):
+ return name
+
class LdapConnection(object):
def __init__(self, server, bind_dn, bind_password):
self.connection = ldap.initialize(server)
self.connection.simple_bind_s(bind_dn, bind_password)
self.charset = "utf-8"
class LdapConnection(object):
def __init__(self, server, bind_dn, bind_password):
self.connection = ldap.initialize(server)
self.connection.simple_bind_s(bind_dn, bind_password)
self.charset = "utf-8"
+ self.ops = DatabaseOperations()
def add_s(self, dn, modlist):
mods = []
def add_s(self, dn, modlist):
mods = []