def login(): if OFFLINE: #Loading an off line test user sessionID = get_facebook_oauth_token() userCache[sessionID] = O.User('John Smith', 'Test ID', sessionID, time.time(), 203, 1, 'en_US', 'control', {}, {}) return redirect(url_for('index')) #If not OFFLINE: return facebook.authorize(callback=url_for('facebook_authorized', next=request.args.get('next') or request.referrer or None, _external=True))
def login(): if OFFLINE: #Loading an off line test user sessionID = get_facebook_oauth_token() userCache[sessionID] = O.User('John Smith', 'Test ID', sessionID, time.time(), 203, 1, 'ko_KR', 'control', {}, {}, ['TEMP_Data']) newUser = User(sessionID, u'TEST ID', u'John Smith', u'ko_KR', 203, 'control', 1, {}, {}, {'TEMP_crawlData'}, int(time.time())) db.session.add(newUser) db.session.commit() return redirect(url_for('index')) #If not OFFLINE: return facebook.authorize(callback=url_for('facebook_authorized', next=request.args.get('next') or request.referrer or None, _external=True))