简体   繁体   中英

Like reloading data without refreshing, but in python

I have some jQuery code similar to this:

var refreshStuff = setInterval(function() {
    $.ajax({
        // get some data from database and show it on html page
    });
}, 5000);

Basically, code is used to constantly refresh one part of html page which is the most recent data from database...

Is it possible to do such thing in python (version 2.x) and how? Thanks for any tips/urls ;-)

You need to write web application, there are a lot of tools for Python. It can be small web frameworks like Bottle, or big frameworks like Django. It also could be just Python, but frameworks will make your development easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM