-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support both sync and async in ComponentDependencyMiddleware #466
feat: Support both sync and async in ComponentDependencyMiddleware #466
Conversation
for more information, see https://pre-commit.ci
Well, that looks like I've broken something :) Let me take a look why the tests are failing. |
src/django_components/middleware.py
Outdated
response = self.get_response(request) | ||
response = self.process_response(request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, maybe the issue is that we pass request
here instead of response
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd do it :) Hopefully it's working with that change
@TheSteveBurgess thanks a lot for the PR! 🚀 It looks great! There's one typo, let's see if things work after that :) |
Co-authored-by: Juro Oravec <juraj.oravec.josefson@gmail.com>
Co-authored-by: Juro Oravec <juraj.oravec.josefson@gmail.com>
I ran the tests locally, everything should be passing after fixing the function signatures |
Amazing! Thanks for that :) |
Merged! @TheSteveBurgess thanks a lot again :) I plan to release this as part of v0.70 together with #465 later today |
Hi,
PR for converting the middleware to async as mentioned here (#464)
This is working fine for me both sync and async via Daphne.