iommirocks / iommi

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

Question about fbv return Page directly. #541

Closed ivkus closed 5 months ago

ivkus commented 5 months 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 5 months 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 5 months ago

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