From: jlaine Date: Mon, 24 May 2010 17:56:40 +0000 (+0000) Subject: declare database operations X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=5e5a297901eafca68d181d75f952f33bb53f49b1;p=matthijs%2Fupstream%2Fdjango-ldapdb.git declare database operations git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@872 e071eeec-0327-468d-9b6a-08194a12b294 --- diff --git a/ldapdb/__init__.py b/ldapdb/__init__.py index 4f9392e..db0e25e 100644 --- a/ldapdb/__init__.py +++ b/ldapdb/__init__.py @@ -21,6 +21,7 @@ import ldap from django.conf import settings +from django.db.backends import BaseDatabaseOperations def convert(field, value, func): if not value or field == 'jpegPhoto': @@ -40,11 +41,16 @@ def escape_ldap_filter(value): .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" + self.ops = DatabaseOperations() def add_s(self, dn, modlist): mods = []