git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@474
e071eeec-0327-468d-9b6a-
08194a12b294
"""
__metaclass__ = ModelBase
- def __init__(self, dn=None, *args, **kwargs):
- self.dn = dn
+ dn = django.db.models.fields.CharField(max_length=200)
+
+ def __init__(self, *args, **kwargs):
super(Model, self).__init__(*args, **kwargs)
self.saved_pk = self.pk
# process results
for dn, attrs in vals:
- row = [dn]
+ row = []
for field in iter(self.model._meta.fields):
- row.append(attrs.get(field.db_column, None))
+ if field.attname == 'dn':
+ row.append(dn)
+ else:
+ row.append(attrs.get(field.db_column, None))
yield row
class QuerySet(BaseQuerySet):