Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Daniel Bowen7,224 Points
Not clear what I'm doing wrong
treehouse is clearly set as the key, what am I doing wrong?
from flask import Flask from flask import make_response app = Flask(__name__) @app.route('/save') def save(): response = make_response(redirect(url_for('index'))) nothing = '' response.set_cookie('treehouse', nothing) return response
Jennifer NordellTreehouse Teacher
Hi there! I believe there are two things going on here, and mostly it has to do with Treehouse challenges being picky about what happens here. Apparently, it really doesn't want an empty string. And it also doesn't like your redirect. So I modified your code slightly so that it gives the results that Treehouse is expecting. Take a look:
from flask import Flask from flask import make_response app = Flask(__name__) @app.route('/save') def save(): response = make_response() nothing = 'nothing' response.set_cookie('treehouse', nothing) return response
Hope this helps!