mango r214 - in branches/django: . mango



Author: ovitters
Date: Sat Jun 21 23:45:53 2008
New Revision: 214
URL: http://svn.gnome.org/viewvc/mango?rev=214&view=rev

Log:
	* mango/views.py (list_users): Make use of new Users class.


Modified:
   branches/django/   (props changed)
   branches/django/ChangeLog
   branches/django/mango/views.py

Modified: branches/django/mango/views.py
==============================================================================
--- branches/django/mango/views.py	(original)
+++ branches/django/mango/views.py	Sat Jun 21 23:45:53 2008
@@ -51,20 +51,19 @@
         return HttpResponseServerError('Cannot connect to LDAP?')
 
     filter = '(objectClass=posixAccount)'
-    users = l.search_s(settings.MANGO_CFG['ldap_users_basedn'],
-               ldap.SCOPE_SUBTREE, filter, None)
+    users = models.Users.search(filter)
     
-    for dn, user in users:
+    for user in users:
         usernode = ET.SubElement(el, 'user')
         
         node = ET.SubElement(usernode, 'uid')
-        node.text = user['uid'][0]
+        node.text = user.uid
 
         node = ET.SubElement(usernode, 'name')
-        node.text = user['cn'][0]
+        node.text = user.cn
 
         node = ET.SubElement(usernode, 'email')
-        node.text = user['mail'][0]
+        node.text = user.mail
 
     return get_xmlresponse(doc, "../www/list_users.xsl")
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]