iommirocks / iommi

Your first pick for a django power cord
http://iommi.rocks
BSD 3-Clause "New" or "Revised" License
659 stars 45 forks source link

Question about fbv return Page directly. #541

Closed ivkus closed 2 weeks ago

ivkus commented 2 weeks ago

django function based views should return a django.http.HTTPResponse, but in the cookbook: How do I specify the context used when a Template is rendered?, a Page return directly.

I could not find a way to convert a Page to HTTPResponse. can someone explain it in detail?

boxed commented 2 weeks ago

The iommi middleware will intercept any iommi type and do the bind and render to response calls. The code in the documentation will work.

ivkus commented 2 weeks ago

thank you. I forget to check the middleware. besides, this is a good project. i learned much from here. thank you again!