Skip to content
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

Wagtail deprecated request.site #194

Closed
wants to merge 1 commit into from

Conversation

joaquinstirling
Copy link

@joaquinstirling joaquinstirling commented Sep 9, 2020

as the log says "Please update your code to use Site.find_for_request(request) in place of request.site."

I'm making this change because I had to create my own middleware inside my app to get wagtailtrans running. this will fix the issues and have support for the future Wagtail versions.

related: Issue #185

as the log says "Please update your code to use Site.find_for_request(request) in place of request.site."
@Vadim-Karpenko
Copy link

I think you forgot to import the Site object, could you please take a look?
from wagtail.core.models import Site

@jjanssen
Copy link
Member

Thanks for taking the effort to create a PR for this. As we're also taking backwards compatibility into account we made a release this week which applies these changes, as well as having it compatible with codebases that still have the SiteMiddleware implemented until Wagtail 2.11.

@jjanssen jjanssen closed this Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants