mango r262 - in branches/django: . mango



Author: ovitters
Date: Fri Jun 27 20:39:59 2008
New Revision: 262
URL: http://svn.gnome.org/viewvc/mango?rev=262&view=rev

Log:
	* mango/models.py (Users.modules): Add modules property to User model.


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

Modified: branches/django/mango/models.py
==============================================================================
--- branches/django/mango/models.py	(original)
+++ branches/django/mango/models.py	Fri Jun 27 20:39:59 2008
@@ -239,6 +239,13 @@
 
         return self._groups
 
+    @property
+    def modules(self):
+        if self._modules is None:
+            self._modules = Modules.search(Q(memberUid=self.__dict__['uid']), ('cn', 'objectClass'))
+
+        return self._modules
+
     def add_to_xml(self, ET, formnode):
         for item in ('uid', 'cn', 'mail', 'description'):
             node = ET.SubElement(formnode, item)



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