Hi! I've been using Datastar with Django for some time now and loving it! I would like to get your guys feedback on expanding the Django module with two additional features (1) a request metadata middleware and; (2) a CSRF bridge for unsafe requests.
The proposed API would include:
is_datastar(request) that detects Datastar-Request: true
DatastarDetails, providing boolean request metadata
DatastarHttpRequest, as a typing contract for request.datastar
DatastarMiddleware, supporting sync and async Django middleware
I have a PoC for this called django-datastar. If this fits the intended scope of datastar-py I'm happy to open a PR on it!
Hi! I've been using Datastar with Django for some time now and loving it! I would like to get your guys feedback on expanding the Django module with two additional features (1) a request metadata middleware and; (2) a CSRF bridge for unsafe requests.
The proposed API would include:
is_datastar(request)that detectsDatastar-Request: trueDatastarDetails, providing boolean request metadataDatastarHttpRequest, as a typing contract forrequest.datastarDatastarMiddleware, supporting sync and async Django middlewareI have a PoC for this called django-datastar. If this fits the intended scope of
datastar-pyI'm happy to open a PR on it!