Skip to content

Commit

Permalink
Inherit from HTMLResponse instead of Response on _TemplateResponse (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sponsfreixes authored Sep 7, 2023
1 parent f1ad207 commit 93074e8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions starlette/templating.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from starlette.background import BackgroundTask
from starlette.datastructures import URL
from starlette.requests import Request
from starlette.responses import Response
from starlette.responses import HTMLResponse
from starlette.types import Receive, Scope, Send

try:
Expand All @@ -23,9 +23,7 @@
jinja2 = None # type: ignore[assignment]


class _TemplateResponse(Response):
media_type = "text/html"

class _TemplateResponse(HTMLResponse):
def __init__(
self,
template: typing.Any,
Expand Down

0 comments on commit 93074e8

Please sign in to comment.