maces / fastapi-htmx

Extension for FastAPI to make HTMX easier to use.
GNU Lesser General Public License v3.0
229 stars 9 forks source link

Use isinstance(response, Mapping) instead of isinstance(response,dict) #2

Closed saolof closed 1 year ago

saolof commented 1 year ago

Currently types like ChainMap or UserDict are not treated as dictionaries by the library. An alternative here is to just check if the response inherits from the fastapi/starlette response base class.

maces commented 1 year ago

Nice, thx will add it.