X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=ldapdb%2F__init__.py;h=db0e25e9d5417cd9301ddd4e7cb74367a0e3c2e7;hb=f6a7be3e0e92faae7d60e807d584c9560c988ae7;hp=07db7bb587b2fca5da7b0cca6cca8384efd482a7;hpb=c92a7be6f574fceac92e13b5805aebdbc31c281e;p=matthijs%2Fupstream%2Fdjango-ldapdb.git diff --git a/ldapdb/__init__.py b/ldapdb/__init__.py index 07db7bb..db0e25e 100644 --- a/ldapdb/__init__.py +++ b/ldapdb/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # django-ldapdb -# Copyright (C) 2009 Bolloré telecom +# Copyright (C) 2009-2010 Bolloré telecom # See AUTHORS file for a full list of contributors. # # This program is free software: you can redistribute it and/or modify @@ -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 = []