def add_result_db(item, date, http_result, post_user, post_pw): user = core.authenticate(post_user, post_pw) if user is not None: core.add_result(item.url.id, date, http_result['code'], http_result['time'])
def store_results(users): for user in users: for item in user.url_users: http_result, date = core.get_http_status(item.url.url_address) core.add_result(item.url.id, date, http_result['code'], http_result['time'] ) print item.url.url_address, http_result['code']