cleanup
authorjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 29 Jun 2009 10:29:14 +0000 (10:29 +0000)
committerjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 29 Jun 2009 10:29:14 +0000 (10:29 +0000)
git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@439 e071eeec-0327-468d-9b6a-08194a12b294

ldapdb/models/base.py

index c64e59d9d2fbc52ae766b6ea2ed9651f0cd06f3e..9ba331edfd45f43d75a859e7d5f0c6659405b89a 100644 (file)
@@ -33,10 +33,7 @@ class ModelBase(django.db.models.base.ModelBase):
     Metaclass for all LDAP models.
     """
     def __new__(cls, name, bases, attrs):
-        attr_meta = attrs.get('Meta', None)
-        if attr_meta:
-            dn = attr_meta._dn
-            object_classes = attr_meta._object_classes
+        attr_meta = attrs.pop('Ldap', None)
 
         super_new = super(ModelBase, cls).__new__
         new_class = super_new(cls, name, bases, attrs)
@@ -48,8 +45,8 @@ class ModelBase(django.db.models.base.ModelBase):
         new_class._default_manager.get_query_set = get_query_set
 
         if attr_meta:
-            new_class._meta.dn = dn
-            new_class._meta.object_classes = attr_meta._object_classes
+            new_class._meta.dn = attr_meta.dn
+            new_class._meta.object_classes = attr_meta.object_classes
 
         return new_class