diff roundup/cgi/templating.py @ 2136:ee3cf6a44f29

queries on a per-user basis, and public queries [SF#891798] :) EditAction was confused about who "self" was Edit collision detection was broken for index-page edits
author Richard Jones <richard@users.sourceforge.net>
date Fri, 26 Mar 2004 04:50:51 +0000
parents 917826e3fb54
children 702f9a6afdcf
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Fri Mar 26 02:24:45 2004 +0000
+++ b/roundup/cgi/templating.py	Fri Mar 26 04:50:51 2004 +0000
@@ -124,7 +124,7 @@
                 raise
 
         if self.templates.has_key(src) and \
-                stime < self.templates[src].mtime:
+                stime <= self.templates[src].mtime:
             # compiled template is up to date
             return self.templates[src]
 
@@ -134,7 +134,7 @@
         content_type = mimetypes.guess_type(filename)[0] or 'text/html'
         pt.pt_edit(open(src).read(), content_type)
         pt.id = filename
-        pt.mtime = time.time()
+        pt.mtime = stime
         return pt
 
     def __getitem__(self, name):
@@ -195,6 +195,7 @@
              'tracker': client.instance,
              'utils': utils(client),
              'templates': Templates(client.instance.config.TEMPLATES),
+             'template': self,
         }
         # add in the item if there is one
         if client.nodeid:
@@ -644,6 +645,10 @@
     def designator(self):
         """Return this item's designator (classname + id)."""
         return '%s%s'%(self._classname, self._nodeid)
+
+    def is_retired(self):
+        """Is this item retired?"""
+        return self._klass.is_retired(self._nodeid)
     
     def submit(self, label="Submit Changes"):
         """Generate a submit button.
@@ -1505,6 +1510,7 @@
         ''' Support the "in" operator. We have to make sure the passed-in
             value is a string first, not a HTMLProperty.
         '''
+        print (self, value, self._value)
         return str(value) in self._value
 
     def reverse(self):

Roundup Issue Tracker: http://roundup-tracker.org/