bottlepy / bottle

bottle.py is a fast and simple micro-framework for python web-applications.
http://bottlepy.org/
MIT License
8.37k stars 1.46k forks source link

fix: globals().update(include('sample')) overrides local env bound functions #1218

Open rpuntaie opened 4 years ago

rpuntaie commented 4 years ago

I use this to define just functions in templates and then "import" them in the mentioned way. Then I noticed that a second %include behaves differently. The reason was that the second %include is bound to the env inside the include merged with the current env (using globals().update).