Wagtail 2.9 deprecates support for request.site
cspollar opened this issue · comments
Chris commented
Wagtail 2.9 deprecates wagtail.core.middleware.SiteMiddleware
which makes the current site object available in request.site
.
References to request.site in your code should be removed; the recommended way of retrieving the current site is Site.find_for_request(request)
Source: Wagtail 2.9 Docs
There are 3 references to request.site
in views.py that will need to be updated before the middleware can be removed.