forked from akubera/pypugjs
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
- pypugjs version: 5.8.0
- Flask version: 1.0.2
- Python version: 3.6.7
- Operating System: Ubuntu 18.04.2 LTS (bionic)
Description
when having a template with an include statement, if the contents of the included templates are changed the page still shows the old included page (perhaps some sort of a caching issue ?), unless the template with the include statement is itself modified
(ps: I understand that you're an active Django dev and this is a Flask issue, I'll hopefully put a pull request shortly)
What I Did
- create files with the following structure
app.py
templates/foo.pug
templates/bar.pug
- contents of app.py
import flask
app = flask.Flask(__name__)
app.jinja_env.add_extension('pypugjs.ext.jinja.PyPugJSExtension')
@app.route('/')
def foo():
return flask.render_template('foo.pug')
if __name__ == '__main__':
app.run(debug=True)- contents of
foo.pug
p abc
include bar
- contents of
bar.pug
p this text does not change
- run app.py with
python3 app.py - open the webpage on a browser (I am using firefox)
- while the app is running modify
bar.pugto (DO NOT modifyfoo.pug)
p i told you so
- reload the webpage
- (Issue) the webpages' content does not change
- modify the contents of
foo.pugand save the file, then reload the page - the webpages' content changes
no commands other than running the file, no error traceback
rysev-a
Metadata
Metadata
Assignees
Labels
No labels