206
207
message_cookie = self.client.cookies['messages'].value
207
208
messages = storage._decode(message_cookie)
208
209
# Check for messages in the context
210
211
messages = response.context["messages"]
211
212
# Check for messages attached to the request on a TemplateResponse
212
213
elif hasattr(response, "_request") and hasattr(response._request,