diff MPIWGStaff.py @ 57:84879a3f91a6

getLastArrivals
author dwinter
date Tue, 30 Apr 2013 22:34:00 +0200
parents a6ace48c2bf2
children d452fff7c52e
line wrap: on
line diff
--- a/MPIWGStaff.py	Tue Apr 30 18:35:08 2013 +0200
+++ b/MPIWGStaff.py	Tue Apr 30 22:34:00 2013 +0200
@@ -1054,7 +1054,8 @@
                 raise Redirect(self.absolute_url())  # redirects to `/members`, adjust as needed
             
         
-                
+ 
+        
     def index_html(self,REQUEST,RESPONSE):
         """show homepage"""
         logging.debug("MPIWGStaffFolder: index_html!")
@@ -1136,6 +1137,19 @@
             return pubs
         except:
             return []
+    
+    def getLastArrivals(self,limit=None):
+        """getlast arrivals"""
+        if not limit:
+            selectStr="select * from personal_www_list_web where publish_the_data = 'yes' and is_scholar='yes' order by date_from DESC"
+        else:
+            selectStr="select * from personal_www_list_web where publish_the_data = 'yes' and is_scholar='yes' order by date_from DESC limit %s"%limit  
+        
+        res=self.members.executeZSQL(selectStr)
+        
+        return res
+
+ 
 def manage_addMPIWGStaffFolderForm(self):
     """form for adding the project"""
     pt=PageTemplateFile('zpt/addMPIWGStaffFolderForm', globals()).__of__(self)