From 29d308dca099fd6365d272c8a0bb2b8206562f87 Mon Sep 17 00:00:00 2001 From: jlaine Date: Mon, 24 May 2010 18:30:33 +0000 Subject: [PATCH] declare connection features git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@877 e071eeec-0327-468d-9b6a-08194a12b294 --- ldapdb/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ldapdb/__init__.py b/ldapdb/__init__.py index db0e25e..f466bea 100644 --- a/ldapdb/__init__.py +++ b/ldapdb/__init__.py @@ -21,7 +21,7 @@ import ldap from django.conf import settings -from django.db.backends import BaseDatabaseOperations +from django.db.backends import BaseDatabaseFeatures, BaseDatabaseOperations 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') +class DatabaseFeatures(BaseDatabaseFeatures): + pass + 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.features = DatabaseFeatures() self.ops = DatabaseOperations() def add_s(self, dn, modlist): -- 2.30.2