def POST(self): db.refreshMem()
'/updateLink', 'updateLink', '/addGroup', 'addGroup', '/addLink', 'addLink', '/delete', 'delete', '/delGroup', 'delGroup', '/refresh','refresh' ) app = web.application(urls, globals()) render = web.template.render('templates/') if __name__ == "__main__": app.run() db.refreshMem() class index: def GET(self): urls = db.g_urls_map print(urls) params = web.Storage(locals()) return render.index(params) class elink: def GET(self): urls = db.getAllHttpUrls() groups = db.g_groups params = web.Storage(locals())
import web import sqliteDB as db urls = ('/(.*)/', 'redirect', '/', 'index', '/index', 'index', '/elink', 'elink', '/upGroup', 'upGroup', '/updateLink', 'updateLink', '/addGroup', 'addGroup', '/addLink', 'addLink', '/delete', 'delete', '/delGroup', 'delGroup', '/refresh', 'refresh') app = web.application(urls, globals()) render = web.template.render('templates/') if __name__ == "__main__": app.run() db.refreshMem() class index: def GET(self): urls = db.g_urls_map print(urls) params = web.Storage(locals()) return render.index(params) class elink: def GET(self): urls = db.getAllHttpUrls() groups = db.g_groups params = web.Storage(locals()) return render.elink(params)