Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3731 Lượt xem

I have a generated string and would like to send that as a file to the web client.

I have done that using http.Controller and

return request.make_response( document, headers=[ ('Content-Disposition', 
'attachment; filename="freebusy.ics"'),
('Content-ype', 'text/calendar'),
('Content-Length', len(document)), ])

I would like to do the same within models.Model method.

Is it possible?

 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 15
13195
3
thg 7 25
9130
1
thg 5 25
1382
0
thg 1 24
2027
1
thg 2 22
24314