Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3438 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
12916
3
thg 7 25
8723
1
thg 5 25
1023
0
thg 1 24
1708
1
thg 2 22
23854