changeset 24:319b57c70203

moved getProjectsAndTagsAsTSV method to MPIWGroot
author dwinter
date Wed, 29 Feb 2012 20:05:28 +0100
parents 47ec4facdf1c
children 1456ddf7583e
files MPIWGThesaurus.py
diffstat 1 files changed, 20 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/MPIWGThesaurus.py	Wed Feb 29 19:57:44 2012 +0100
+++ b/MPIWGThesaurus.py	Wed Feb 29 20:05:28 2012 +0100
@@ -233,24 +233,24 @@
             redirect(RESPONSE,'manage_main')
     
     
-    def getAllProjectsAndTagsAsCSV(self,archived=1):
-        """alle projekte auch die nicht getaggten"""
-        retList=[]
-        for project in self.getProjectFields('WEB_title_or_short'):
-            proj = project[0]
-            p_name = project[1]
-            retProj=[]
-            if (not proj.isArchivedProject() and archived==1) or (proj.isArchivedProject() and archived==2):
-                retProj.append(self.utf8ify(p_name))  
-                retProj.append(self.utf8ify(proj.getContent('xdata_01')))   
-                retProj.append("|".join([person[1] for person in self.thesaurus.getPersonsFromProject(proj.getId())]))
-                retProj.append("|".join([person[1] for person in self.thesaurus.getHistoricalPlacesFromProject(proj.getId())]))
-                retProj.append("|".join([person[1] for person in self.thesaurus.getObjectsFromProject(proj.getId())]))
-                retProj.append("|".join(self.thesaurus.getTags(proj.getId())))
-                retList.append("\t".join(retProj))
-
-        return "\n".join(retList);
-    
+#    def getAllProjectsAndTagsAsCSV(self,archived=1):
+#        """alle projekte auch die nicht getaggten"""
+#        retList=[]
+#        for project in self.getProjectFields('WEB_title_or_short'):
+#            proj = project[0]
+#            p_name = project[1]
+#            retProj=[]
+#            if (not proj.isArchivedProject() and archived==1) or (proj.isArchivedProject() and archived==2):
+#                retProj.append(self.utf8ify(p_name))  
+#                retProj.append(self.utf8ify(proj.getContent('xdata_01')))   
+#                retProj.append("|".join([person[1] for person in self.thesaurus.getPersonsFromProject(proj.getId())]))
+#                retProj.append("|".join([person[1] for person in self.thesaurus.getHistoricalPlacesFromProject(proj.getId())]))
+#                retProj.append("|".join([person[1] for person in self.thesaurus.getObjectsFromProject(proj.getId())]))
+#                retProj.append("|".join(self.thesaurus.getTags(proj.getId())))
+#                retList.append("\t".join(retProj))
+#
+#        return "\n".join(retList);
+#    
     def getProjectsAndTags(self):
         """projekte und tags"""
        
@@ -270,8 +270,7 @@
                     projs=[projs]
                 
                 for proj in projs:
-                    if proj is None:
-                        continue
+                    
                     projectID=proj[0]
                     logging.debug("PTS"+repr(projectTags))
                     project=projectTags.get(projectID,projectHolder(projectID))
@@ -1642,4 +1641,4 @@
 
 
     if RESPONSE is not None:
-        redirect(RESPONSE,'manage_main')
+        redirect(RESPONSE,'manage_main')
\ No newline at end of file