Python Flask Basics Character Builder Set a Cookie

Harold Thompson
Harold Thompson
10,404 Points

How to set parameters on set_cookie method? Flask Basics Challenge 3 of 3

I keep on getting, "Bummer: Didn't get 'treehouse cookie error"

flask_app.py
from flask import Flask, make_response

app = Flask(__name__)


@app.route('/save')
def save():
    response = make_response
    response.set_cookie('treehouse', "save")
    return response

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Harold Thompson! You're doing terrific. I'm not exactly sure when (or why) this happened, but the ending parentheses that are supposed to be beside make_response have disappeared.

Instead of:

response = make_response

You should have:

response = make_response()

Hope this helps! :sparkles:

Harold Thompson
Harold Thompson
10,404 Points

Thank you Jennifer Nordell.