def blacklistsUpdate(): db = Database() blacklists = db.getAllBlacklist() template = get_template('blacklists.html') return template.render({ "blacklists": blacklists, "total": len(blacklists) })
def index(): db = Database() totalRequests = len(db.getAllLogs()) totalBlacklists = len(db.getAllBlacklist()) template = get_template('index.html') return template.render({ "total_requests": totalRequests, 'total_blacklists': totalBlacklists })
def logs(): db = Database() allLogs = db.getAllLogs() template = get_template('logs.html') return template.render({"logs": allLogs})
def blacklistsUpdate(): bl = Blacklists() Thread(target=bl.update, args=()).start() template = get_template('updateBlacklist.html') return template.render()
def blocked(): template = get_template('blocked.html') return template.render()