stewartpark / Flask-JSGlue

Flask-JSGlue helps hook up your Flask application nicely with the front end.
80 stars 40 forks source link

jsglue.js is missing #34

Open tomasantunes opened 2 years ago

tomasantunes commented 2 years ago

I installed Flask-JSGlue2 through pip and I get the following error:

GET https://domain.com/jsglue.js net::ERR_ABORTED 500 (INTERNAL SERVER ERROR)

When I click it it takes me to the script tag which is the following:

<script src="/jsglue.js" type="text/javascript"></script>

I tried changing the JSGLUE_JS_PATH constant but it didn't help.

Gbillington1 commented 2 years ago

I'm getting the same issue in my network tab, and a template error from jijna: jinja2.exceptions.TemplateNotFound: jsglue/js_bridge.js

SatGarcia commented 2 years ago

@Gbillington1 I had the same issue with missing template. I had to manually create a jsglue folder with my templates directory and copy the js_bridge.js file (which I had to grab from GitHub) there. After that, the issue went away.

tomasantunes commented 2 years ago

Thanks. That solves it.

eanon commented 1 year ago

Solved it a more automated way in this PR: https://github.com/stewartpark/Flask-JSGlue/pull/35