annotate MPIWGHelper.py @ 202:c3c834cf1a6d

minor bug in sho preprints
author dwinter
date Thu, 27 Jun 2013 12:26:00 +0200
parents 90d44df497a6
children 938add25f81b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
1 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
2
10
c711fe75d0ac order by weight form for MPIWGFolder. more cleanup.
casties
parents: 0
diff changeset
3 import SrvTxtUtils
81
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
4 import time
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
5 import email
0
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
6 import logging
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
7
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
8 #ersetzt logging
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
9 def logger(txt,method,txt2):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
10 """logging"""
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
11 logging.info(txt+ txt2)
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
12
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
13 def getTextFromNode(nodename):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
14
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
15 nodelist=nodename.childNodes
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
16 rc = ""
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
17 for node in nodelist:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
18 if node.nodeType == node.TEXT_NODE:
159
ee79f6ba8d01 clean up staff editing and some zpt forms.
casties
parents: 81
diff changeset
19 rc = rc + node.data
0
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
20 return rc
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
21
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
22 def getTemplate(self, tpName):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
23 """get a template file either form the instance or from the product"""
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
24 #ext=self.ZopeFind(self.aq_parent,obj_ids=[tpName])
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
25 if hasattr(self,tpName):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
26 pt = getattr(self,tpName)
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
27 else:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
28 pt=PageTemplateFile('zpt/'+tpName, globals()).__of__(self)
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
29 assert(pt)
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
30 return pt
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
31
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
32 def sortStopWordsF(self,xo,yo):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
33 if not hasattr(self,'_v_stopWords'):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
34 self._v_stopWords=self.stopwords_en.data.split("\n")
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
35
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
36 x=unicodify(xo[1])
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
37 y=unicodify(yo[1])
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
38
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
39 strx=x.split(" ")
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
40 stry=y.split(" ")
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
41
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
42 for tmp in strx:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
43 if tmp.lower() in self._v_stopWords:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
44 del strx[strx.index(tmp)]
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
45
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
46 for tmp in stry:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
47 if tmp.lower() in self._v_stopWords:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
48 del stry[stry.index(tmp)]
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
49
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
50 return cmp(" ".join(strx)," ".join(stry))
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
51
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
52 def sortStopWords(self):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
53 return lambda x,y : sortStopWordsF(self,x,y)
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
54
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
55 def sortF(x,y):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
56 try:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
57 return cmp(x[1],y[1])
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
58 except:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
59 try:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
60 return cmp(str(x[1]),str(y[1]))
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
61 except:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
62
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
63 return 0
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
64
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
65 def sortI(x,y):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
66 xsplit=x[1].split(".")
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
67 ysplit=y[1].split(".")
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
68 xret=""
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
69 yret=""
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
70 try:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
71 for i in range(5):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
72 try:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
73 yret=yret+"%04i"%int(xsplit[i])
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
74 except:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
75 yret=yret+"%04i"%0
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
76
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
77 try:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
78 xret=xret+"%04i"%int(ysplit[i])
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
79 except:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
80 xret=xret+"%04i"%0
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
81
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
82
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
83 return cmp(int(yret),int(xret))
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
84 except:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
85 return cmp(x[1],y[1])
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
86
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
87
10
c711fe75d0ac order by weight form for MPIWGFolder. more cleanup.
casties
parents: 0
diff changeset
88 # decode str (utf-8 or latin-1 representation) into unicode object
c711fe75d0ac order by weight form for MPIWGFolder. more cleanup.
casties
parents: 0
diff changeset
89 unicodify = SrvTxtUtils.unicodify
0
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
90
10
c711fe75d0ac order by weight form for MPIWGFolder. more cleanup.
casties
parents: 0
diff changeset
91 # encode unicode object or string into byte string in utf-8 representation.
c711fe75d0ac order by weight form for MPIWGFolder. more cleanup.
casties
parents: 0
diff changeset
92 utf8ify = SrvTxtUtils.utf8ify
0
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
93
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
94 def shortenString(s, l, ellipsis='...'):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
95 """returns a string of length l (or l-1) by omitting characters in the middle of s, replacing with ellipsis."""
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
96 l1 = int((l - len(ellipsis)) / 2)
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
97 return "%s%s%s"%(s[:l1],ellipsis,s[-l1:])
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
98
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
99
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
100 #
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
101 # navigation methods (should better be a mixin class)
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
102 #
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
103 def getBreadcrumbs(self):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
104 """return list of breadcrumbs from here to the root"""
191
90d44df497a6 updated breadcrumb handling, works for members now.
casties
parents: 162
diff changeset
105 #logging.debug("getBreadcrumbs of %s"%repr(self))
90d44df497a6 updated breadcrumb handling, works for members now.
casties
parents: 162
diff changeset
106 crumbs = [{'text':self.title, 'url':self.absolute_url(), 'object':self}]
0
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
107 parent = self.aq_parent
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
108 if hasattr(parent, 'getBreadcrumbs'):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
109 if self.title:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
110 return parent.getBreadcrumbs() + crumbs
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
111 else:
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
112 # if there's no title, skip this level
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
113 return parent.getBreadcrumbs()
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
114
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
115 return crumbs
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
116
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
117
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
118 def getSection(self, crumbs=None):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
119 """returns the current section name"""
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
120 # use breadcrumbs if available
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
121 if crumbs is not None and len(crumbs) > 0:
191
90d44df497a6 updated breadcrumb handling, works for members now.
casties
parents: 162
diff changeset
122 return crumbs[0]['object'].getId()
0
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
123
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
124 p = self
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
125 sec = None
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
126 # descend parents to the root (and remember the last id)
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
127 while p is not None and p.meta_type != 'MPIWGRoot':
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
128 sec = p.getId()
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
129 p = p.aq_parent
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
130
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
131 return sec
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
132
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
133 def getSubSection(self, crumbs=None):
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
134 """returns the current subsection name"""
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
135 # use breadcrumbs if available
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
136 if crumbs is not None and len(crumbs) > 1:
191
90d44df497a6 updated breadcrumb handling, works for members now.
casties
parents: 162
diff changeset
137 return crumbs[1]['object'].getId()
0
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
138
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
139 p = self
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
140 sec = None
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
141 subsec = None
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
142 # descend parents to the root (and remember the last id)
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
143 while p is not None and p.meta_type != 'MPIWGRoot':
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
144 subsec = sec
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
145 sec = p.getId()
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
146 p = p.aq_parent
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
147
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
148 return subsec
bca61e893fcc first checkin of MPIWGWeb r2 branch from CVS into mercurial
casties
parents:
diff changeset
149
80
b1893c4c9d2c more display of project pages.
casties
parents: 10
diff changeset
150
162
47392bf3fcba clean ups and fixes
casties
parents: 159
diff changeset
151 def getPathStyle(self, path, selected, style=""):
47392bf3fcba clean ups and fixes
casties
parents: 159
diff changeset
152 """returns a string with the given style + 'sel' if path == selected."""
47392bf3fcba clean ups and fixes
casties
parents: 159
diff changeset
153 if path == selected:
47392bf3fcba clean ups and fixes
casties
parents: 159
diff changeset
154 return style + 'sel'
47392bf3fcba clean ups and fixes
casties
parents: 159
diff changeset
155 else:
47392bf3fcba clean ups and fixes
casties
parents: 159
diff changeset
156 return style
47392bf3fcba clean ups and fixes
casties
parents: 159
diff changeset
157
47392bf3fcba clean ups and fixes
casties
parents: 159
diff changeset
158
47392bf3fcba clean ups and fixes
casties
parents: 159
diff changeset
159
80
b1893c4c9d2c more display of project pages.
casties
parents: 10
diff changeset
160 def getUrl(self, baseUrl=None):
b1893c4c9d2c more display of project pages.
casties
parents: 10
diff changeset
161 """returns URL to this object"""
b1893c4c9d2c more display of project pages.
casties
parents: 10
diff changeset
162 if baseUrl is None:
b1893c4c9d2c more display of project pages.
casties
parents: 10
diff changeset
163 return self.absolute_url()
b1893c4c9d2c more display of project pages.
casties
parents: 10
diff changeset
164
b1893c4c9d2c more display of project pages.
casties
parents: 10
diff changeset
165 return '%s/%s' % (baseUrl, self.getId())
b1893c4c9d2c more display of project pages.
casties
parents: 10
diff changeset
166
81
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
167
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
168 def redirect(self, RESPONSE, url):
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
169 """mache ein redirect mit einem angehaengten time stamp um ein reload zu erzwingen"""
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
170 timeStamp = time.time()
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
171
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
172 if url.find("?") > -1: # giebt es schon parameter
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
173 addStr = "&time=%s"
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
174 else:
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
175 addStr = "?time=%s"
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
176
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
177 RESPONSE.setHeader('Last-Modified', email.Utils.formatdate().split("-")[0] + 'GMT')
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
178 logging.debug(email.Utils.formatdate() + ' GMT')
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
179 RESPONSE.redirect(url + addStr % timeStamp)
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
180
975a8d88e315 new editable info blocks for projects.
casties
parents: 80
diff changeset
181