Skip to content

Commit 2721940

Browse files
author
Kenny Putman
committed
Make InertiaRequest inherit from HttpRequest for compatibility (#78)
1 parent 8734939 commit 2721940

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

inertia/http.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,22 @@
44

55
import requests
66
from django.core.exceptions import ImproperlyConfigured
7-
from django.http import HttpResponse
7+
from django.http import HttpRequest, HttpResponse
88
from django.template.loader import render_to_string
99

1010
from .helpers import deep_transform_callables, validate_type
1111
from .prop_classes import DeferredProp, IgnoreOnFirstLoadProp, MergeableProp
1212
from .settings import settings
1313

14+
1415
INERTIA_REQUEST_ENCRYPT_HISTORY = "_inertia_encrypt_history"
1516
INERTIA_SESSION_CLEAR_HISTORY = "_inertia_clear_history"
1617

1718
INERTIA_TEMPLATE = "inertia.html"
1819
INERTIA_SSR_TEMPLATE = "inertia_ssr.html"
1920

2021

21-
class InertiaRequest:
22+
class InertiaRequest(HttpRequest):
2223
def __init__(self, request):
2324
self.request = request
2425

0 commit comments

Comments
 (0)