version 1.40, 2004/10/21 14:28:55
|
version 1.46, 2005/04/25 16:58:02
|
Line 1
|
Line 1
|
"""This contains the class MPIWG Projects |
"""This contains the class MPIWG Projects |
for organizing and maintaining the different projectspages |
for organizing and maintaining the different project pages |
|
|
""" |
""" |
from Products.PageTemplates.PageTemplateFile import PageTemplateFile |
from Products.PageTemplates.PageTemplateFile import PageTemplateFile |
from Products.PageTemplates.PageTemplate import PageTemplate |
from Products.PageTemplates.PageTemplate import PageTemplate |
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate |
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate |
from Products.ZSQLExtend.ZSQLExtend import ZSQLExtendFolder |
from Products.ZSQLExtend.ZSQLExtend import ZSQLExtendFolder |
|
from Products.ZCatalog.CatalogPathAwareness import CatalogAware |
from Globals import package_home |
from Globals import package_home |
import urllib |
import urllib |
import MPIWGStaff |
import MPIWGStaff |
Line 17 import zLOG
|
Line 18 import zLOG
|
import xmlhelper # Methoden zur Verwaltung der projekt xmls |
import xmlhelper # Methoden zur Verwaltung der projekt xmls |
from OFS.SimpleItem import SimpleItem |
from OFS.SimpleItem import SimpleItem |
from OFS.Folder import Folder |
from OFS.Folder import Folder |
|
from Products.ZSQLMethods.SQL import SQLConnectionIDs |
|
|
from bibliography import * |
from bibliography import * |
|
import time |
|
|
definedFields=['WEB_title','xdata_01','xdata_02','xdata_03','xdata_04','xdata_05','xdata_06','xdata_07','xdata_08','xdata_09','xdata_10','xdata_11','xdata_12','xdata_13','WEB_project_header','WEB_project_description','WEB_related_pub'] |
definedFields=['WEB_title','xdata_01','xdata_02','xdata_03','xdata_04','xdata_05','xdata_06','xdata_07','xdata_08','xdata_09','xdata_10','xdata_11','xdata_12','xdata_13','WEB_project_header','WEB_project_description','WEB_related_pub'] |
|
|
Line 33 def sortF(x,y):
|
Line 36 def sortF(x,y):
|
try: |
try: |
return cmp(str(x[1]),str(y[1])) |
return cmp(str(x[1]),str(y[1])) |
except: |
except: |
print "error",x[1],y[1] |
|
return 0 |
return 0 |
|
|
def sortI(x,y): |
def sortI(x,y): |
Line 160 class MPIWGRoot(ZSQLExtendFolder):
|
Line 163 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
def replaceNotEmpty(self,format,field): |
def replaceNotEmpty(self,format,field): |
"""replace not empty""" |
"""replace not empty""" |
if field and (not field==''): |
if field and (not field.lstrip()==''): |
return format%field |
return format%field |
else: |
else: |
return "" |
return "" |
|
|
|
|
|
def isActual(self,project): |
|
"""checke if project is actual""" |
|
actualTime=time.localtime() |
|
obj= project.getObject() |
|
|
|
if getattr(obj,'archiveTime',actualTime)< actualTime: |
|
return False |
|
else: |
|
return True |
|
|
def redirectIndex_html(self,request): |
def redirectIndex_html(self,request): |
#return request['URL1']+'/index_html' |
#return request['URL1']+'/index_html' |
|
|
Line 286 class MPIWGRoot(ZSQLExtendFolder):
|
Line 299 class MPIWGRoot(ZSQLExtendFolder):
|
list[urllib.quote(personNormal)]=(personNormal,[project[1]]) |
list[urllib.quote(personNormal)]=(personNormal,[project[1]]) |
|
|
except: |
except: |
print "ERROR",project |
zLOG.LOG("MPIWG Web (harvestHistoricalPerson)",zLOG.ERROR,"cannot annalyize: %s"%repr(project)) |
|
|
|
|
return list |
return list |
|
|
Line 317 class MPIWGRoot(ZSQLExtendFolder):
|
Line 331 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
def showHistoricalPersons(self): |
def showHistoricalPersons(self): |
"""show persons""" |
"""show persons""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/showHistoricalPersons').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','showHistoricalPersons')).__of__(self) |
return pt() |
return pt() |
|
|
|
|
def editHistoricalPersonsForm(self): |
def editHistoricalPersonsForm(self): |
"""edit historical persons for consistency""" |
"""edit historical persons for consistency""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/editHistoricalPersonsForm').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editHistoricalPersonsForm')).__of__(self) |
return pt() |
return pt() |
|
|
def getProjectsByFieldContent(self,fieldName,fieldContentsEntry): |
def getProjectsByFieldContent(self,fieldName,fieldContentsEntry): |
Line 339 class MPIWGRoot(ZSQLExtendFolder):
|
Line 353 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
def changeMPIWGRootForm(self): |
def changeMPIWGRootForm(self): |
"""edit""" |
"""edit""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/changeMPIWGRootForm').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','changeMPIWGRootForm')).__of__(self) |
return pt() |
return pt() |
|
|
def changeMPIWGRoot(self,title,disciplineList,themesList,RESPONSE=None): |
def changeMPIWGRoot(self,title,disciplineList,themesList,connection_id,RESPONSE=None): |
"""change""" |
"""change""" |
self.title=title |
self.title=title |
|
self.connection_id=connection_id |
self.disciplineList=disciplineList |
self.disciplineList=disciplineList |
self.themesList=themesList |
self.themesList=themesList |
|
|
Line 392 class MPIWGRoot(ZSQLExtendFolder):
|
Line 407 class MPIWGRoot(ZSQLExtendFolder):
|
"""getListofFieldNames""" |
"""getListofFieldNames""" |
ret=[] |
ret=[] |
|
|
objects=self.ZopeFind(self,obj_metatypes=['MPIWGProject'],search_sub=1) |
objects=self.ZopeFind(self.projects,obj_metatypes=['MPIWGProject'],search_sub=0) |
|
|
|
|
for object in objects: |
for object in objects: |
obj=object[1] |
obj=object[1] |
|
|
|
if not getattr(obj,'invisible',None): |
if fieldName=="WEB_title_or_short": |
if fieldName=="WEB_title_or_short": |
|
|
if len(obj.getContent('xdata_07'))<3: # hack weil z.Z. manchmal noch ein Trennzeichen ; oder , im Feld statt leer |
if len(obj.getContent('xdata_07'))<3: # hack weil z.Z. manchmal noch ein Trennzeichen ; oder , im Feld statt leer |
Line 435 class MPIWGRoot(ZSQLExtendFolder):
|
Line 452 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
def importNamesForm(self): |
def importNamesForm(self): |
"""Form""" |
"""Form""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/MPIWGNamesForm.zpt').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','MPIWGNamesForm.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
def importNames(self,fileupload,folderName,RESPONSE=None): |
def importNames(self,fileupload,folderName,RESPONSE=None): |
Line 456 class MPIWGRoot(ZSQLExtendFolder):
|
Line 473 class MPIWGRoot(ZSQLExtendFolder):
|
project._setObject(splitted[0],newObj) |
project._setObject(splitted[0],newObj) |
#print "done:",splitted[0] |
#print "done:",splitted[0] |
except: |
except: |
print "not done:",splitted[0] |
zLOG.LOG("MPIWG Web (importNames)",zLOG.INFO,"cannot import: %s"%splitted[0]) |
|
|
|
|
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
Line 488 class MPIWGRoot(ZSQLExtendFolder):
|
Line 506 class MPIWGRoot(ZSQLExtendFolder):
|
if member[1].getId() not in foundUserNames: |
if member[1].getId() not in foundUserNames: |
member[1].aq_parent.manage_delObjects(ids=[member[1].getId()]) |
member[1].aq_parent.manage_delObjects(ids=[member[1].getId()]) |
RESPONSE.write("<p>deleted:%s</p>\n"%member[1].getId()) |
RESPONSE.write("<p>deleted:%s</p>\n"%member[1].getId()) |
|
try: |
self.MembersCatalog.manage_catalogReindex(self.REQUEST,RESPONSE,self.REQUEST['URL1']) |
self.MembersCatalog.manage_catalogReindex(self.REQUEST,RESPONSE,self.REQUEST['URL1']) |
|
except: |
|
pass |
|
self.ProjectCatalog.manage_catalogReindex(self.REQUEST,RESPONSE,self.REQUEST['URL1']) |
|
|
|
|
if RESPONSE is not None: |
if RESPONSE is not None: |
Line 534 class MPIWGRoot(ZSQLExtendFolder):
|
Line 554 class MPIWGRoot(ZSQLExtendFolder):
|
"""generate Tree from project list""" |
"""generate Tree from project list""" |
returnList=[] |
returnList=[] |
for project in self.getProjectFields('xdata_05',sort="int"): # get Projects sorted by xdata_05 |
for project in self.getProjectFields('xdata_05',sort="int"): # get Projects sorted by xdata_05 |
|
|
for idNr in project[1].split(";"): # more than one number |
for idNr in project[1].split(";"): # more than one number |
if not idNr=="": |
if not idNr=="": |
splittedId=idNr.split(".") |
splittedId=idNr.split(".") |
Line 726 class MPIWGRoot(ZSQLExtendFolder):
|
Line 747 class MPIWGRoot(ZSQLExtendFolder):
|
proj2=[] |
proj2=[] |
for x in proj: |
for x in proj: |
|
|
|
if not getattr(x.getObject(),'invisible',None): |
if not((splitted[1]==" Christoph") and (splitted[0]=="Hoffmann") and (str(x.WEB_title).find('Einstein')>0)): |
if not((splitted[1]==" Christoph") and (splitted[0]=="Hoffmann") and (str(x.WEB_title).find('Einstein')>0)): |
|
|
#print repr(splitted[1]),repr(splitted[0]),repr(x.WEB_title) |
|
proj2.append(x) |
proj2.append(x) |
# proj2.sort(sortP) |
|
# ret.append((y,proj2)) |
|
else: |
else: |
proj2=[] |
proj2=[] |
|
|
Line 739 class MPIWGRoot(ZSQLExtendFolder):
|
Line 758 class MPIWGRoot(ZSQLExtendFolder):
|
if proj: |
if proj: |
names=[x.WEB_title for x in proj] |
names=[x.WEB_title for x in proj] |
for x in proj: |
for x in proj: |
|
|
if not x.WEB_title in names: |
if not x.WEB_title in names: |
proj2.append(x) |
proj2.append(x) |
|
|
Line 829 class MPIWGRoot(ZSQLExtendFolder):
|
Line 849 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
def manage_addMPIWGRootForm(self): |
def manage_addMPIWGRootForm(self): |
"""form for adding the root""" |
"""form for adding the root""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/addMPIWGRootForm.zpt').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','addMPIWGRootForm.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
def manage_addMPIWGRoot(self,id,title,RESPONSE=None): |
def manage_addMPIWGRoot(self,id,title,connection_id="",RESPONSE=None): |
"""add a root folder""" |
"""add a root folder""" |
newObj=MPIWGRoot(id,title) |
newObj=MPIWGRoot(id,title) |
self._setObject(id,newObj) |
self._setObject(id,newObj) |
|
ob=getattr(self,id) |
|
setattr(ob,'connection_id',connection_id) |
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
|
|
|
|
class MPIWGProject(Folder): |
class MPIWGProject(CatalogAware,Folder): |
"""Class for Projects""" |
"""Class for Projects""" |
|
|
meta_type='MPIWGProject' |
meta_type='MPIWGProject' |
|
default_catalog='ProjectCatalog' |
|
|
|
def PrincipiaSearchSource(self): |
|
"""Return cataloguable key for ourselves.""" |
|
return str(self) |
|
|
|
def versionHeader(self): |
|
"""version Header, gibt header text entsprechend der aktuellen version aus""" |
|
|
|
actualTime=time.localtime() |
|
retTXT="""<h2>This is an outdated version, for the actual version please refer to <a href="%s">%s</a></h2>""" |
|
s=self.aq_parent.absolute_url() |
|
#print getattr(self,'archiveTime',actualTime) |
|
if getattr(self,'archiveTime',actualTime)< actualTime: |
|
return retTXT%(s,s) |
|
else: |
|
return "" |
|
def isActual(self): |
|
"""gibt 1 zurueck wenn aktuell, 0 sonst""" |
|
actualTime=time.localtime() |
|
|
|
|
|
#print getattr(self,'archiveTime',actualTime) |
|
if getattr(self,'archiveTime',actualTime)< actualTime: |
|
return 0 |
|
else: |
|
return 1 |
|
|
|
def copyObjectToArchive(self): |
|
"""kopiere aktuelles objekt ins archiv""" |
|
cb=self.aq_parent.manage_copyObjects(self.getId()) |
|
self.manage_pasteObjects(cb) |
|
actualTime=time.localtime() |
|
|
|
self.manage_renameObject(self.getId(),self.getId()+"_"+time.strftime("%Y%m%d%H%M%S",actualTime)) |
|
obj=getattr(self,self.getId()+"_"+time.strftime("%Y%m%d%H%M%S",actualTime)) |
|
obj.setArchiveTime(time.strftime("%Y%m%d%H%M%S",actualTime)) |
|
ids=[x[0] for x in self.ZopeFind(obj,obj_metatypes=['MPIWGProject'])] |
|
obj.manage_delObjects(ids) |
|
|
|
def setArchiveTime(self,time): |
|
"""set Archive Time""" |
|
self.archiveTime=time[0:] |
|
|
|
def versionManageForm(self): |
|
"""version Manage form:currently only set to invisible""" |
|
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','MPIWGProject_versionManageForm.zpt')).__of__(self) |
|
return pt() |
|
|
|
def versionManage(self,invisible=None,RESPONSE=None): |
|
"""version Manage form:currently only set to invisible""" |
|
self.invisible=invisible |
|
|
|
if RESPONSE is not None: |
|
RESPONSE.redirect('manage_main') |
|
|
|
|
def crossLinker(self): |
def crossLinker(self): |
Line 903 class MPIWGProject(Folder):
|
Line 979 class MPIWGProject(Folder):
|
{'label':'Edit BasisInfo','action':'editMPIWGBasisForm'}, |
{'label':'Edit BasisInfo','action':'editMPIWGBasisForm'}, |
{'label':'Edit Publications','action':'editMPIWGRelatedPublicationsForm'}, |
{'label':'Edit Publications','action':'editMPIWGRelatedPublicationsForm'}, |
{'label':'Edit Themes & Disciplines','action':'editMPIWGDisciplinesThemesForm'}, |
{'label':'Edit Themes & Disciplines','action':'editMPIWGDisciplinesThemesForm'}, |
|
{'label':'Versionmanager','action':'versionManageForm'}, |
) |
) |
|
|
|
|
|
def checkDate(self,date): |
|
"""teste ob zum Zeitpunkt date eine andere version existierte""" |
|
|
|
|
|
def sortProjectsByTime(x,y): |
|
return cmp(x[1].archiveTime,y[1].archiveTime) |
|
|
|
finds=self.ZopeFind(self,obj_metatypes=['MPIWGProject']) |
|
if not finds: |
|
return self.absolute_url() |
|
else: |
|
finds.sort(sortProjectsByTime) |
|
|
|
for find in finds: |
|
if int(find[1].archiveTime) > int(date): |
|
return find[1].absolute_url() |
|
|
|
return self.absolute_url() |
|
|
|
|
|
|
def index_html(self): |
def index_html(self): |
"""show homepage""" |
"""show homepage""" |
|
|
|
if self.REQUEST.has_key('date') and self.REQUEST.SESSION.get('MPI_redirected',None)==None: |
|
self.REQUEST.SESSION['MPI_redirected']=1 |
|
self.REQUEST.RESPONSE.redirect(self.checkDate(self.REQUEST['date'])) |
|
else: |
|
self.REQUEST.SESSION['MPI_redirected']=None |
|
|
ext=self.ZopeFind(self.aq_parent,obj_ids=["project_main"]) |
ext=self.ZopeFind(self.aq_parent,obj_ids=["project_main"]) |
|
|
if ext: |
if ext: |
return getattr(self,ext[0][1].getId())() |
return getattr(self,ext[0][1].getId())() |
|
|
pt=PageTemplateFile('Products/MPIWGWeb/zpt/project_main').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','project_main')).__of__(self) |
return pt() |
return pt() |
|
|
|
|
Line 938 class MPIWGProject(Folder):
|
Line 1043 class MPIWGProject(Folder):
|
"""Inhalt des Feldes""" |
"""Inhalt des Feldes""" |
|
|
text=u'' |
text=u'' |
#print "FIELD",field |
|
for x in getattr(self,field): |
for x in getattr(self,field): |
#print "HIHIIII" |
|
|
|
try: |
try: |
text +=x.encode('utf-8') |
text +=x |
except: |
|
try: |
|
text =x.encode('utf-8') |
|
except: |
except: |
text=x.decode('latin-1').encode('utf-8') |
text = x |
|
|
|
|
|
|
#delete separator (;) if is there is one |
|
## try: |
|
## print text, text[len(text)-1] |
|
## except: |
|
## print "error:",text |
|
try: |
try: |
if text[len(text)-1]==";": |
if text[len(text)-1]==";": |
text=text[0:len(text)-1] |
text=text[0:len(text)-1] |
|
|
|
|
except: |
except: |
"""nothing""" |
pass |
|
|
|
if text=='': |
|
text2=text |
|
else: |
text2=re.sub(r';([^\s])','; \g<1>',text) |
text2=re.sub(r';([^\s])','; \g<1>',text) |
|
|
#teste ob ergebnis leer und header dann nehme title |
#teste ob ergebnis leer und header dann nehme title |
|
|
if (text2=='') and (field=='WEB_project_header'): |
if (text2=='') and (field=='WEB_project_header'): |
Line 972 class MPIWGProject(Folder):
|
Line 1074 class MPIWGProject(Folder):
|
#teste ob WEB_project_description und keine führenden p tags |
#teste ob WEB_project_description und keine führenden p tags |
if (len(text2)>4) and (not text2[0:3]=='<p>') and (field=='WEB_project_description'): |
if (len(text2)>4) and (not text2[0:3]=='<p>') and (field=='WEB_project_description'): |
return "<p>"+text2+"</p>" |
return "<p>"+text2+"</p>" |
#if text2=="Otto Sibum": |
|
#text2="H. Otto Sibum" |
|
return text2 |
return text2.encode('utf-8') |
|
|
def show_html(self): |
def show_html(self): |
"""simple index""" |
"""simple index""" |
#return "HI" |
#return "HI" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/MPIWGProject_index.zpt').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','MPIWGProject_index.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
def editMPIWGProjectForm(self): |
def editMPIWGProjectForm(self): |
"""editform""" |
"""editform""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/edit_MPIWGProject.zpt').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','edit_MPIWGProject.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
def editMPIWGProject(self,RESPONSE=None): |
def editMPIWGProject(self,RESPONSE=None): |
"""edit the project""" |
"""edit the project and archive the old version""" |
|
|
|
self.copyObjectToArchive() # archive the object |
|
|
|
|
#return self.REQUEST |
|
for x in definedFields: |
for x in definedFields: |
if self.REQUEST.has_key(x): |
if self.REQUEST.has_key(x): |
|
|
setattr(self,x,[self.REQUEST[x].decode('utf-8')]) |
setattr(self,x,[self.REQUEST[x].decode('utf-8')]) |
|
|
|
|
|
|
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
|
|
def editMPIWGDisciplinesThemesForm(self): |
def editMPIWGDisciplinesThemesForm(self): |
"""edit the disciplines and themes Form""" |
"""edit the disciplines and themes Form""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/edit_MPIWGDisciplinesThemes.zpt').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','edit_MPIWGDisciplinesThemes.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
def editMPIWGDisciplinesThemes(self,disciplines=None,themes=None,RESPONSE=None): |
def editMPIWGDisciplinesThemes(self,disciplines=None,themes=None,RESPONSE=None): |
Line 1027 class MPIWGProject(Folder):
|
Line 1133 class MPIWGProject(Folder):
|
|
|
def isChecked(self,wert,list): |
def isChecked(self,wert,list): |
"""check if wert is in ; seperated list""" |
"""check if wert is in ; seperated list""" |
print "W:",wert |
|
print "L:",list,type(list) |
|
#felder sind manchmnal als liste mit einem element definiert |
#felder sind manchmnal als liste mit einem element definiert |
if type(list) is StringType or UnicodeType: |
if type(list) is StringType or UnicodeType: |
splitted=list.split(";") |
splitted=list.split(";") |
else: |
else: |
splitted=list[0].split(";") |
splitted=list[0].split(";") |
|
|
print splitted |
|
for x in splitted: |
for x in splitted: |
if (not x==u'') and x in wert: |
if (not x==u'') and x in wert: |
return 1 |
return 1 |
Line 1043 class MPIWGProject(Folder):
|
Line 1148 class MPIWGProject(Folder):
|
|
|
def editMPIWGBasisForm(self): |
def editMPIWGBasisForm(self): |
"""editform""" |
"""editform""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/edit_MPIWGBasis.zpt').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','edit_MPIWGBasis.zpt')).__of__(self) |
return pt() |
return pt() |
def editMPIWGRelatedPublicationsForm(self): |
def editMPIWGRelatedPublicationsForm(self): |
"""Edit related Publications""" |
"""Edit related Publications""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/edit_MPIWGRelatedPublications.zpt').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','edit_MPIWGRelatedPublications.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
|
|
def loadNewFileForm(self): |
def loadNewFileForm(self): |
"""Neues XML-File einlesen""" |
"""Neues XML-File einlesen""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/MPIWGProject_newfile.zpt').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','MPIWGProject_newfile.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
def loadNewFile(self,RESPONSE=None): |
def loadNewFile(self,RESPONSE=None): |
Line 1081 class MPIWGProject(Folder):
|
Line 1186 class MPIWGProject(Folder):
|
|
|
def manage_addMPIWGProjectForm(self): |
def manage_addMPIWGProjectForm(self): |
"""form for adding the project""" |
"""form for adding the project""" |
pt=PageTemplateFile('Products/MPIWGWeb/zpt/addMPIWGProjectForm.zpt').__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','addMPIWGProjectForm.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
def manage_addMPIWGProject(self,id,RESPONSE=None): |
def manage_addMPIWGProject(self,id,RESPONSE=None): |
Line 1089 def manage_addMPIWGProject(self,id,RESPO
|
Line 1194 def manage_addMPIWGProject(self,id,RESPO
|
#print argv |
#print argv |
fileupload=self.REQUEST.get('fileupload',None) |
fileupload=self.REQUEST.get('fileupload',None) |
if fileupload: |
if fileupload: |
print fileupload |
|
file_name=fileupload.filename |
file_name=fileupload.filename |
filedata=fileupload.read() |
filedata=fileupload.read() |
|
|