Try to prevent caching for any /index (grid) page
if this works, maybe also should do it for /view since that can have a rows grid?
This commit is contained in:
parent
a6b7056f2a
commit
8a378317c0
|
@ -3941,7 +3941,13 @@ class MasterView(View):
|
||||||
"List / search {}".format(model_title_plural))
|
"List / search {}".format(model_title_plural))
|
||||||
config.add_route(route_prefix, '{}/'.format(url_prefix))
|
config.add_route(route_prefix, '{}/'.format(url_prefix))
|
||||||
config.add_view(cls, attr='index', route_name=route_prefix,
|
config.add_view(cls, attr='index', route_name=route_prefix,
|
||||||
permission='{}.list'.format(permission_prefix))
|
permission='{}.list'.format(permission_prefix),
|
||||||
|
# hopefully, instruct browser to never cache this page.
|
||||||
|
# on windows/chrome we are seeing some caching when e.g.
|
||||||
|
# user applies some filters, then views a record, then
|
||||||
|
# clicks back button, filters no longer are applied
|
||||||
|
# cf. https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/viewconfig.html#non-predicate-arguments
|
||||||
|
http_cache=0)
|
||||||
|
|
||||||
# download results
|
# download results
|
||||||
# this is the "new" more flexible approach, but we only want to
|
# this is the "new" more flexible approach, but we only want to
|
||||||
|
|
Loading…
Reference in a new issue