Mercurial > hg > documentViewer
comparison documentViewer.py @ 22:b139f9937e97
preliminary version 0.2
- lots of stuff rewritten
- new template system
- still no access control
author | casties |
---|---|
date | Thu, 06 Apr 2006 19:13:43 +0200 |
parents | 9884703dae70 |
children | e93fb8cadd3a |
comparison
equal
deleted
inserted
replaced
21:0af46e75de3c | 22:b139f9937e97 |
---|---|
14 import Ft.Xml.XPath | 14 import Ft.Xml.XPath |
15 | 15 |
16 import os.path | 16 import os.path |
17 import cgi | 17 import cgi |
18 import urllib | 18 import urllib |
19 import zLOG | |
19 | 20 |
20 def getTextFromNode(nodename): | 21 def getTextFromNode(nodename): |
21 nodelist=nodename.childNodes | 22 nodelist=nodename.childNodes |
22 rc = "" | 23 rc = "" |
23 for node in nodelist: | 24 for node in nodelist: |
34 socket.setdefaulttimeout(5) | 35 socket.setdefaulttimeout(5) |
35 return ret | 36 return ret |
36 | 37 |
37 def getParamFromDigilib(path,param): | 38 def getParamFromDigilib(path,param): |
38 """gibt param von dlInfo aus""" | 39 """gibt param von dlInfo aus""" |
39 imageUrl=genericDigilib+"/dlInfo-xml.jsp?fn="+path | 40 imageUrl=genericDigilib+"/dirInfo-xml.jsp?mo=dir&fn="+path |
40 | 41 |
42 zLOG.LOG("documentViewer (getparamfromdigilib)", zLOG.INFO, "dirInfo (%s) from %s"%(param,imageUrl)) | |
43 | |
41 try: | 44 try: |
42 dom = NonvalidatingReader.parseUri(imageUrl) | 45 dom = NonvalidatingReader.parseUri(imageUrl) |
43 except: | 46 except: |
44 return None | 47 return None |
45 | 48 |
46 | 49 params=dom.xpath("//dir/%s"%param) |
47 params=dom.xpath("//document-parameters/parameter[@name='%s']/@value"%param) | 50 zLOG.LOG("documentViewer (getparamfromdigilib)", zLOG.INFO, "dirInfo:%s"%params) |
48 | 51 |
49 if params: | 52 if params: |
50 return params[0].value | 53 return getTextFromNode(params[0]) |
51 | 54 |
52 def parseUrlTextTool(url): | 55 |
53 """parse index meta""" | 56 |
54 | 57 |
55 try: | 58 ## |
56 dom = NonvalidatingReader.parseUri(url) | 59 ## documentViewer class |
57 except: | 60 ## |
58 zLOG.LOG("documentViewer (parseUrlTexttool)", zLOG.INFO,"%s (%s)"%sys.exc_info()[0:2]) | 61 class documentViewer(Folder): |
59 return (None,None,None) | |
60 | |
61 archivePaths=dom.xpath("//resource/archive-path") | |
62 | |
63 if archivePaths and (len(archivePaths)>0): | |
64 archivePath=getTextFromNode(archivePaths[0]) | |
65 else: | |
66 archivePath=None | |
67 | |
68 | |
69 images=dom.xpath("//texttool/image") | |
70 | |
71 if images and (len(images)>0): | |
72 image=getTextFromNode(images[0]) | |
73 else: | |
74 image=None | |
75 | |
76 if image and archivePath: | |
77 image=os.path.join(archivePath,image) | |
78 image=image.replace("/mpiwg/online",'') | |
79 pt=getParamFromDigilib(image,'pt') | |
80 | |
81 else: | |
82 image=None | |
83 | |
84 viewerUrls=dom.xpath("//texttool/digiliburlprefix") | |
85 | |
86 if viewerUrls and (len(viewerUrls)>0): | |
87 viewerUrl=getTextFromNode(viewerUrls[0]) | |
88 else: | |
89 viewerUrl=None | |
90 | |
91 | |
92 textUrls=dom.xpath("//texttool/text") | |
93 | |
94 if textUrls and (len(textUrls)>0): | |
95 textUrl=getTextFromNode(textUrls[0]) | |
96 else: | |
97 textUrl=None | |
98 return viewerUrl,(image,pt),textUrl | |
99 | |
100 | |
101 class documentViewer(ZopePageTemplate): | |
102 """document viewer""" | 62 """document viewer""" |
103 | 63 |
104 meta_type="Document viewer" | 64 meta_type="Document viewer" |
105 | 65 |
106 security=ClassSecurityInfo() | 66 security=ClassSecurityInfo() |
107 manage_options=ZopePageTemplate.manage_options+( | 67 manage_options=Folder.manage_options+( |
108 {'label':'main config','action':'changeDocumentViewerForm'}, | 68 {'label':'main config','action':'changeDocumentViewerForm'}, |
109 ) | 69 ) |
110 | 70 |
111 _default_content_fn = os.path.join(package_home(globals()),'zpt','documentViewer_template.zpt') | 71 # templates and forms |
112 | 72 viewer_main = PageTemplateFile('zpt/viewer_main', globals()) |
113 def __init__(self,id,imageViewerUrl,title=""): | 73 thumbs_main = PageTemplateFile('zpt/thumbs_main', globals()) |
74 image_main = PageTemplateFile('zpt/image_main', globals()) | |
75 head_main = PageTemplateFile('zpt/head_main', globals()) | |
76 docuviewer_css = PageTemplateFile('css/docuviewer.css', globals()) | |
77 | |
78 security.declareProtected('View management screens','changeDocumentViewerForm') | |
79 changeDocumentViewerForm = PageTemplateFile('zpt/changeDocumentViewer', globals()) | |
80 | |
81 | |
82 def __init__(self,id,imageViewerUrl,title="",digilibBaseUrl=None): | |
114 """init document viewer""" | 83 """init document viewer""" |
115 self.id=id | 84 self.id=id |
116 self.title=title | 85 self.title=title |
117 self.imageViewerUrl=imageViewerUrl | 86 self.imageViewerUrl=imageViewerUrl |
118 | 87 self.digilibBaseUrl = digilibBaseUrl |
119 security.declareProtected('View management screens','changeDocumentViewerForm') | 88 if not self.digilibBaseUrl: |
120 def changeDocumentViewerForm(self): | 89 self.digilibBaseUrl = self.findDigilibUrl() |
121 """change it""" | 90 # add template folder so we can always use template.something |
122 pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','changeDocumentViewer.zpt')).__of__(self) | 91 self.manage_addFolder('template') |
123 return pt() | 92 |
93 | |
94 security.declareProtected('View','index_html') | |
95 def index_html(self,mode,url,start=0,pn=1): | |
96 ''' | |
97 view it | |
98 @param mode: defines which type of document is behind url | |
99 @param url: url which contains display information | |
100 ''' | |
101 | |
102 zLOG.LOG("documentViewer (index)", zLOG.INFO, "mode: %s url:%s start:%s pn:%s"%(mode,url,start,pn)) | |
103 print "dlbaseurl:", self.digilibBaseUrl | |
104 | |
105 if not hasattr(self, 'template'): | |
106 # create template folder if it doesn't exist | |
107 print "no template folder -- creating" | |
108 self.manage_addFolder('template') | |
109 | |
110 if not self.digilibBaseUrl: | |
111 self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary" | |
112 | |
113 print "dlbaseurl:", self.digilibBaseUrl | |
114 | |
115 docinfo = self.getDocinfo(mode=mode, url=url) | |
116 pageinfo = self.getPageinfo(start=start,current=pn) | |
117 pt = getattr(self.template, 'viewer_main') | |
118 return pt(docinfo=docinfo,pageinfo=pageinfo) | |
124 | 119 |
125 | 120 |
126 def changeDocumentViewer(self,imageViewerUrl,title="",RESPONSE=None): | |
127 """init document viewer""" | |
128 self.title=title | |
129 self.imageViewerUrl=imageViewerUrl | |
130 | |
131 if RESPONSE is not None: | |
132 RESPONSE.redirect('manage_main') | |
133 | |
134 | |
135 def imageLink(self,nr): | 121 def imageLink(self,nr): |
136 """link hinter den images""" | 122 """link hinter den images""" |
137 paramsTmp=cgi.parse_qs(self.REQUEST['QUERY_STRING']) | 123 paramsTmp=cgi.parse_qs(self.REQUEST['QUERY_STRING']) |
138 params={} | 124 params={} |
139 for x in paramsTmp.iteritems(): | 125 for x in paramsTmp.iteritems(): |
141 | 127 |
142 params['pn']=nr | 128 params['pn']=nr |
143 newUrl=self.REQUEST['URL']+"?"+urllib.urlencode(params) | 129 newUrl=self.REQUEST['URL']+"?"+urllib.urlencode(params) |
144 return newUrl | 130 return newUrl |
145 | 131 |
146 | 132 def getStyle(self, idx, selected, style=""): |
133 """returns a string with the given style + 'sel' if path == selected.""" | |
134 #zLOG.LOG("documentViewer (getstyle)", zLOG.INFO, "idx: %s selected: %s style: %s"%(idx,selected,style)) | |
135 if idx == selected: | |
136 return style + 'sel' | |
137 else: | |
138 return style | |
139 | |
140 | |
147 def thumbruler(self,cols,rows,start,maximum): | 141 def thumbruler(self,cols,rows,start,maximum): |
148 """ruler for thumbs""" | 142 """ruler for thumbs""" |
149 ret="" | 143 ret="" |
150 paramsTmp=cgi.parse_qs(self.REQUEST['QUERY_STRING']) | 144 paramsTmp=cgi.parse_qs(self.REQUEST['QUERY_STRING']) |
151 params={} | 145 params={} |
160 params['start']=newStart | 154 params['start']=newStart |
161 newUrl=self.REQUEST['URL']+"?"+urllib.urlencode(params) | 155 newUrl=self.REQUEST['URL']+"?"+urllib.urlencode(params) |
162 ret+="""<a href="%s">prev</a>"""%newUrl | 156 ret+="""<a href="%s">prev</a>"""%newUrl |
163 | 157 |
164 | 158 |
165 ret+="""<select onChange="location.href='%s&start='+this.options[this.selectedIndex].value" """%newUrlSelect | 159 ret+="""<select onChange="location.href='%s&start='+this.options[this.selectedIndex].value">"""%newUrlSelect |
166 nr,rest=divmod(maximum,cols*rows) | 160 nr,rest=divmod(maximum,cols*rows) |
167 if rest > 0: | 161 if rest > 0: |
168 nr+=1 | 162 nr+=1 |
169 for i in range(nr): | 163 for i in range(nr): |
170 nr=i*cols*rows | 164 nr=i*cols*rows |
180 params['start']=newStart | 174 params['start']=newStart |
181 newUrl=self.REQUEST['URL']+"?"+urllib.urlencode(params) | 175 newUrl=self.REQUEST['URL']+"?"+urllib.urlencode(params) |
182 ret+="""<a href="%s">next</a>"""%newUrl | 176 ret+="""<a href="%s">next</a>"""%newUrl |
183 | 177 |
184 return ret | 178 return ret |
185 | 179 |
186 def textToolThumb(self,url,start=0): | 180 |
187 """understands the texttool format | 181 |
188 @param url: url to index.meta with texttool tag | 182 def getBibinfoFromIndexMeta(self,path,docinfo=None,dom=None): |
189 """ | 183 """gets bibliographical info from the index.meta file at url or given by dom""" |
190 (viewerUrl,imagepath,textpath)=parseUrlTextTool(url) | 184 zLOG.LOG("documentViewer (getbibinfofromindexmeta)", zLOG.INFO,"path: %s"%(path)) |
191 | 185 |
192 imageUrl=genericDigilib+"/servlet/Scaler?fn=%s"%imagepath[0] | 186 if docinfo is None: |
193 | 187 docinfo = {} |
194 pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','thumbs.zpt')).__of__(self) | 188 |
195 return pt(imageUrl=imageUrl,pt=imagepath[1],start=start) | |
196 | |
197 def imagePathThumb(self,path,start=0): | |
198 """path ist the path to the images it is assumes that the index.meta file is one level higher.""" | |
199 | |
200 path=path.replace("/mpiwg/online","") | |
201 pt=getParamFromDigilib(path,'pt') | |
202 imageUrl=genericDigilib+"/servlet/Scaler?fn=%s"%path | |
203 | |
204 pageT=PageTemplateFile(os.path.join(package_home(globals()),'zpt','thumbs.zpt')).__of__(self) | |
205 return pageT(imageUrl=imageUrl,pt=pt,start=start) | |
206 | |
207 def headerFromIndexMeta(self,path): | |
208 """gibt header from index meta out""" | |
209 | |
210 metaData=self.metadata.main.meta.bib | 189 metaData=self.metadata.main.meta.bib |
211 server="http://foxridge.mpiwg-berlin.mpg.de" | 190 if dom is None: |
212 path="/".join(path.split("/")[0:-1]) | 191 server="http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary/servlet/Texter?fn=" |
213 metaUrl=server+path+"/index.meta" | 192 path="/".join(path.split("/")[0:-1]) |
214 | 193 metaUrl=server+path+"/index.meta" |
215 dom = NonvalidatingReader.parseUri(metaUrl) | 194 try: |
195 dom = NonvalidatingReader.parseUri(metaUrl) | |
196 except: | |
197 return docinfo | |
198 | |
216 type=dom.xpath("//bib/@type") | 199 type=dom.xpath("//bib/@type") |
217 if type and (len(type)>0): | 200 if type and (len(type)>0): |
218 type=type[0].value | 201 type=type[0].value |
219 else: | 202 else: |
220 type="generic" | 203 type="generic" |
221 type=type.replace("-"," ")# wrong typesiin index meta "-" instead of " " | 204 type=type.replace("-"," ")# wrong typesiin index meta "-" instead of " " |
222 hash=metaData.generateMappingForType(type) | 205 hash=metaData.generateMappingForType(type) |
223 | 206 |
224 author=getTextFromNode(dom.xpath("//bib/%s"%hash['author'][0])[0]) | 207 docinfo['author']=getTextFromNode(dom.xpath("//bib/%s"%hash['author'][0])[0]) |
225 title=getTextFromNode(dom.xpath("//bib/%s"%hash['title'][0])[0]) | 208 docinfo['title']=getTextFromNode(dom.xpath("//bib/%s"%hash['title'][0])[0]) |
226 year=getTextFromNode(dom.xpath("//bib/%s"%hash['year'][0])[0]) | 209 docinfo['year']=getTextFromNode(dom.xpath("//bib/%s"%hash['year'][0])[0]) |
227 | 210 |
228 return author,title,year | 211 return docinfo |
229 | 212 |
213 | |
214 def getDocinfoFromTextTool(self,url,docinfo=None): | |
215 """parse texttool tag in index meta""" | |
216 zLOG.LOG("documentViewer (getdocinfofromtexttool)", zLOG.INFO,"url: %s"%(url)) | |
217 if docinfo is None: | |
218 docinfo = {} | |
219 | |
220 try: | |
221 dom = NonvalidatingReader.parseUri(url) | |
222 except: | |
223 zLOG.LOG("documentViewer (parseUrlTexttool)", zLOG.INFO,"%s (%s)"%sys.exc_info()[0:2]) | |
224 return docinfo | |
225 | |
226 archivePaths=dom.xpath("//resource/archive-path") | |
227 | |
228 if archivePaths and (len(archivePaths)>0): | |
229 archivePath=getTextFromNode(archivePaths[0]) | |
230 else: | |
231 archivePath=None | |
232 | |
233 images=dom.xpath("//texttool/image") | |
234 | |
235 if images and (len(images)>0): | |
236 image=getTextFromNode(images[0]) | |
237 else: | |
238 image=None | |
239 | |
240 if image and archivePath: | |
241 image=os.path.join(archivePath,image) | |
242 image=image.replace("/mpiwg/online",'') | |
243 pt=getParamFromDigilib(image,'size') | |
244 docinfo['imagePath'] = image | |
245 docinfo['numberOfPages'] = pt | |
246 | |
247 viewerUrls=dom.xpath("//texttool/digiliburlprefix") | |
248 | |
249 if viewerUrls and (len(viewerUrls)>0): | |
250 viewerUrl=getTextFromNode(viewerUrls[0]) | |
251 docinfo['imageURL'] = viewerURL | |
252 | |
253 textUrls=dom.xpath("//texttool/text") | |
254 | |
255 if textUrls and (len(textUrls)>0): | |
256 textUrl=getTextFromNode(textUrls[0]) | |
257 docinfo['textURL'] = textURL | |
258 | |
259 docinfo = self.getBibinfoFromIndexMeta(url,docinfo=docinfo,dom=dom) | |
260 return docinfo | |
261 | |
262 | |
263 def getDocinfoFromImagePath(self,path,docinfo=None): | |
264 """path ist the path to the images it assumes that the index.meta file is one level higher.""" | |
265 zLOG.LOG("documentViewer (getdocinfofromimagepath)", zLOG.INFO,"path: %s"%(path)) | |
266 if docinfo is None: | |
267 docinfo = {} | |
268 docinfo['imagePath'] = path | |
269 path=path.replace("/mpiwg/online","") | |
270 pt=getParamFromDigilib(path,'size') | |
271 docinfo['numberOfPages'] = pt | |
272 imageUrl=genericDigilib+"/servlet/Scaler?fn=%s"%path | |
273 docinfo['imageURL'] = imageUrl | |
274 | |
275 docinfo = self.getBibinfoFromIndexMeta(path,docinfo=docinfo) | |
276 return docinfo | |
277 | |
278 | |
279 def getDocinfo(self, mode, url): | |
280 """returns docinfo depending on mode""" | |
281 zLOG.LOG("documentViewer (getdocinfo)", zLOG.INFO,"mode: %s, url: %s"%(mode,url)) | |
282 # look for cached docinfo in session | |
283 if self.REQUEST.SESSION.has_key('docinfo'): | |
284 docinfo = self.REQUEST.SESSION['docinfo'] | |
285 # check if its still current | |
286 if docinfo is not None and docinfo.get('mode') == mode and docinfo.get('url') == url: | |
287 zLOG.LOG("documentViewer (getdocinfo)", zLOG.INFO,"docinfo in session: %s"%docinfo) | |
288 return docinfo | |
289 # new docinfo | |
290 docinfo = {'mode': mode, 'url': url} | |
291 if mode=="texttool": #index.meta with texttool information | |
292 docinfo = self.getDocinfoFromTextTool(url, docinfo=docinfo) | |
293 elif mode=="imagepath": | |
294 docinfo = self.getDocinfoFromImagePath(url, docinfo=docinfo) | |
295 else: | |
296 zLOG.LOG("documentViewer (getdocinfo)", zLOG.ERROR,"unknown mode!") | |
297 zLOG.LOG("documentViewer (getdocinfo)", zLOG.INFO,"docinfo: %s"%docinfo) | |
298 self.REQUEST.SESSION['docinfo'] = docinfo | |
299 return docinfo | |
300 | |
301 | |
302 def getPageinfo(self, start, current): | |
303 """returns pageinfo with the given parameters""" | |
304 pageinfo = {} | |
305 pageinfo['start'] = start | |
306 pageinfo['current'] = current | |
307 return pageinfo | |
308 | |
230 def text(self,mode,url,pn): | 309 def text(self,mode,url,pn): |
231 """give text""" | 310 """give text""" |
232 if mode=="texttool": #index.meta with texttool information | 311 if mode=="texttool": #index.meta with texttool information |
233 (viewerUrl,imagepath,textpath)=parseUrlTextTool(url) | 312 (viewerUrl,imagepath,textpath)=parseUrlTextTool(url) |
234 | 313 |
277 # | 356 # |
278 # for x in list: | 357 # for x in list: |
279 # PrettyPrint(x) | 358 # PrettyPrint(x) |
280 # | 359 # |
281 # return list | 360 # return list |
282 # | 361 # |
362 | |
283 def image(self,mode,url,pn): | 363 def image(self,mode,url,pn): |
284 """give image out""" | 364 """give image out""" |
285 if mode=="texttool": #index.meta with texttool information | 365 if mode=="texttool": #index.meta with texttool information |
286 (viewerUrl,imagepath,textpath)=parseUrlTextTool(url) | 366 (viewerUrl,imagepath,textpath)=parseUrlTextTool(url) |
287 if not viewerUrl: | 367 if not viewerUrl: |
294 url=self.imageViewerUrl+"pn=%s&fn=%s"%(pn,url) | 374 url=self.imageViewerUrl+"pn=%s&fn=%s"%(pn,url) |
295 ret="""<iframe height="100%%" width="100%%" src="%s"/>"""%url | 375 ret="""<iframe height="100%%" width="100%%" src="%s"/>"""%url |
296 return url | 376 return url |
297 | 377 |
298 | 378 |
299 def thumbs(self,mode,url,start): | 379 def findDigilibUrl(self): |
300 """give thumbs out""" | 380 """try to get the digilib URL from zogilib""" |
301 if mode=="texttool": #index.meta with texttool information | 381 url = self.imageViewerUrl[:-1] + "/getScalerUrl" |
302 return self.textToolThumb(url,int(start)) | 382 try: |
303 elif mode=="imagepath": | 383 scaler = urlopen(url).read() |
304 return self.imagePathThumb(url,int(start)) | 384 return scaler.replace("/servlet/Scaler?", "") |
305 | 385 except: |
306 security.declareProtected('View','index_html') | 386 return None |
307 | 387 |
308 | 388 def changeDocumentViewer(self,imageViewerUrl,title="",digilibBaseUrl=None,RESPONSE=None): |
309 def index_html(self,mode,url,start=0,pn=1): | 389 """init document viewer""" |
310 ''' | 390 self.title=title |
311 view it | 391 self.imageViewerUrl=imageViewerUrl |
312 @param mode: defines which type of document is behind url | 392 self.digilibBaseUrl = digilibBaseUrl |
313 @param url: url which contains display information | 393 |
314 ''' | 394 if RESPONSE is not None: |
315 | 395 RESPONSE.redirect('manage_main') |
316 | 396 |
317 pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','documentViewer_template.zpt')).__of__(self) | 397 |
318 return pt(mode=mode,url=url,start=start,pn=pn) | |
319 | |
320 | 398 |
321 | 399 |
322 # security.declareProtected('View management screens','renameImageForm') | 400 # security.declareProtected('View management screens','renameImageForm') |
323 | 401 |
324 def manage_AddDocumentViewerForm(self): | 402 def manage_AddDocumentViewerForm(self): |
325 """add the viewer form""" | 403 """add the viewer form""" |
326 pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','addDocumentViewer.zpt')).__of__(self) | 404 pt=PageTemplateFile('zpt/addDocumentViewer', globals()).__of__(self) |
327 return pt() | 405 return pt() |
328 | 406 |
329 def manage_AddDocumentViewer(self,id,imageViewerUrl="",title="",RESPONSE=None): | 407 def manage_AddDocumentViewer(self,id,imageViewerUrl="",title="",RESPONSE=None): |
330 """add the viewer""" | 408 """add the viewer""" |
331 newObj=documentViewer(id,imageViewerUrl,title) | 409 newObj=documentViewer(id,imageViewerUrl,title) |
332 self._setObject(id,newObj) | 410 self._setObject(id,newObj) |
333 | 411 |
334 if RESPONSE is not None: | 412 if RESPONSE is not None: |
335 RESPONSE.redirect('manage_main') | 413 RESPONSE.redirect('manage_main') |
336 | 414 |
415 | |
416 ## | |
417 ## DocumentViewerTemplate class | |
418 ## | |
419 class DocumentViewerTemplate(ZopePageTemplate): | |
420 """Template for document viewer""" | |
421 meta_type="DocumentViewer Template" | |
422 | |
423 | |
424 def manage_addDocumentViewerTemplateForm(self): | |
425 """Form for adding""" | |
426 pt=PageTemplateFile('zpt/addDocumentViewerTemplate', globals()).__of__(self) | |
427 return pt() | |
428 | |
429 def manage_addDocumentViewerTemplate(self, id='viewer_main', title=None, text=None, | |
430 REQUEST=None, submit=None): | |
431 "Add a Page Template with optional file content." | |
432 | |
433 self._setObject(id, DocumentViewerTemplate(id)) | |
434 ob = getattr(self, id) | |
435 ob.pt_edit(open(os.path.join(package_home(globals()),'zpt/viewer_main.zpt')).read(),None) | |
436 if title: | |
437 ob.pt_setTitle(title) | |
438 try: | |
439 u = self.DestinationURL() | |
440 except AttributeError: | |
441 u = REQUEST['URL1'] | |
442 | |
443 u = "%s/%s" % (u, urllib.quote(id)) | |
444 REQUEST.RESPONSE.redirect(u+'/manage_main') | |
445 return '' | |
446 | |
447 | |
448 |