Instead of using `eval`, why not use:

```js
% for resource in js_resources:
<script type="text/javascript">
  ${resource.data}
</script>
% endfor
```