backport lost stable head stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 18 Feb 2010 14:02:48 +0100
branchstable
changeset 4636 edafa2343dd7
parent 4635 44a883148ab4 (current diff)
parent 4559 242e76469664 (diff)
child 4637 3e5e5a234d09
backport lost stable head
.hgtags
web/controller.py
web/views/basecontrollers.py
--- a/.hgtags	Thu Feb 18 13:31:03 2010 +0100
+++ b/.hgtags	Thu Feb 18 14:02:48 2010 +0100
@@ -100,3 +100,4 @@
 4281e1e2d76b9a37f38c0eeb1cbdcaa2fac6533c cubicweb-debian-version-3.5.12-1
 5f957e351b0a60d5c5fff60c560b04e666c3a8c6 cubicweb-version-3.6.0
 17e88f2485d1ea1fb8a3926a274637ce19e95d69 cubicweb-debian-version-3.6.0-1
+a0571ff0cb5da51c20a56318a2c1cb81e4a5220e 3.5
--- a/web/controller.py	Thu Feb 18 13:31:03 2010 +0100
+++ b/web/controller.py	Thu Feb 18 14:02:48 2010 +0100
@@ -124,6 +124,10 @@
         else:
             self._cw.set_message(self._cw._('entity deleted'))
 
+    def validate_cache(self, view):
+        view.set_http_cache_headers()
+        self.req.validate_cache()
+
 
     def reset(self):
         """reset form parameters and redirect to a view determinated by given
--- a/web/views/basecontrollers.py	Thu Feb 18 13:31:03 2010 +0100
+++ b/web/views/basecontrollers.py	Thu Feb 18 14:02:48 2010 +0100
@@ -350,7 +350,12 @@
             view = self._cw.vreg['views'].select(vid, req, rset=rset)
         except NoSelectableObject:
             vid = req.form.get('fallbackvid', 'noresult')
+<<<<<<< /home/syt/src/fcubicweb/cubicweb/web/views/basecontrollers.py
             view = self._cw.vreg['views'].select(vid, req, rset=rset)
+=======
+            view = self.vreg['views'].select(vid, req, rset=rset)
+        self.validate_cache(view)
+>>>>>>> /tmp/basecontrollers.py~other.stRkG5
         return self._call_view(view)
 
     @xhtmlize