Django development server has the neat capability of reloading itself whenever the project's python source files are saved, ensuring that the latest version of the project is served at all times. However, to see the changes in the browser, you need manually refresh the relevant page or resort to incorporating a Javascript such as live.js in our source which will keep sending HEAD requests to the server to see if the page has changed and if it has reload the page.
The former approach obviously is repetitive and needlessly painful. The latter approach works fine, but it results in additional requests to your server, something that you may be able to live with or if you're like me, you don't appreciate too much.
Django-autorefresh is a solution to address this.
To use, install this plugin and add the Django app autorefresh to your INSTALLED_APPS. Django app is available at https://github.com/harikvpy/django-autorefresh.
谷歌浏览器、其他Chromium内核的浏览器
为打击盗链困扰,本站已启用人机验证
微信扫码关注左侧公众号,发送“插件”二字获得验证码,验证码5分钟全站有效