Closed joaquinstirling closed 3 years ago
I think you forgot to import the Site object, could you please take a look?
from wagtail.core.models import Site
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.
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