---
** [tickets:#8298] Use jinja caching settings for EW core widgets**
**Status:** in-progress
**Milestone:** unreleased
**Created:** Thu Jun 06, 2019 03:27 PM UTC by Dave Brondsema
**Last Updated:** Thu Jun 06, 2019 03:27 PM UTC
**Owner:** Dave Brondsema
During an upgrade of EasyWidgets from 0.2.dev to 0.3 I saw a few of these
errors. Not really a big deal, just a temporary error during a live upgrade.
But it did highlight the fact that EW was reading template files from disk that
should've been cached. The stack trace seems to miss a few lines, but jinja's
`is_up_to_date` check is running which gives enough of a clue about autoreload
being on.
```
File '/var/local/allura/Allura/allura/templates/widgets/forge_form.html', line
41 in top-level template code
<div class="grid-{{19 + extra_width}}">{{field.display(**ctx)}}</div>
File
'/var/local/env-allura/lib/python2.7/site-packages/EasyWidgets-0.2.dev20150922-py2.7.egg/ew/widget.py',
line 45 in display
File
'/var/local/env-allura/lib/python2.7/site-packages/EasyWidgets-0.2.dev20150922-py2.7.egg/ew/render.py',
line 29 in __call__
File
'/var/local/env-allura/lib/python2.7/site-packages/EasyWidgets-0.2.dev20150922-py2.7.egg/ew/render.py',
line 55 in template
File
'/var/local/env-allura/lib/python2.7/site-packages/EasyWidgets-0.2.dev20150922-py2.7.egg/ew/render.py',
line 208 in load
File
'/var/local/env-allura/lib/python2.7/site-packages/Jinja2-2.10-py2.7.egg/jinja2/environment.py',
line 1122 in is_up_to_date
return self._uptodate()
File
'/var/local/env-allura/lib/python2.7/site-packages/EasyWidgets-0.2.dev20150922-py2.7.egg/ew/render.py',
line 204 in <lambda>
File '/usr/lib64/python2.7/genericpath.py', line 54 in getmtime
return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory:
'/var/local/env-allura/lib/python2.7/site-packages/EasyWidgets-0.2.dev20150922-py2.7.egg/ew/templates/jinja2/checkbox.html'
```
---
Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed
to https://forge-allura.apache.org/p/allura/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://forge-allura.apache.org/p/allura/admin/tickets/options. Or, if this is
a mailing list, you can unsubscribe from the mailing list.