-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Flask) Includes don't change upon modification and reloading webpage #49
Comments
Well, whats you actual use case that includes changing the templates rather than the displayed data? pypugjs is caching templates and thats probably the reason, why you dont see any update to the template, but that should also happen to any other template that is not included. Why do you change the templates at all? |
No this issue does not happen for templates not included (read 9 & 10 of what I did carefully) A use case for this is updating templates, for better looks and positioning of items, I make small changes and see them change the website, and correct/extend them until these small changes amount to big changes. This is literally how I've always coded, and in order to modify the included template I've to kill the server and reload it, and that throttles my workflow |
Of course this is a totally valid use case and at least for Django the template caching is deactivated in debug mode. This shall also be the case for Flask and you are welcome to fix that. I see in the code above, that you also have a debug flag, so that this should be a straight forward fix. |
And if you happen to stumble upon the line, where base templates are not cached while debug is off, please also fix that bug as well. |
Cool, will do, sorry if I sounded a bit rude, have a lovely day 😃 😄 |
You didn’t. In case you have some more minutes to spare, it would be awesome if you can check the project docs about the Flask setup for sanity. |
Hello, i have the same problem with updates included chunks |
Could you supply a test case to fix the problem? |
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 theinclude 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
foo.pug
bar.pug
python3 app.py
bar.pug
to (DO NOT modifyfoo.pug
)foo.pug
and save the file, then reload the pageThe text was updated successfully, but these errors were encountered: