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

Remove need to use deprecated SiteMiddleware #53

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

cspollar
Copy link
Contributor

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.

This resolves #51

@Aleccc
Copy link

Aleccc commented Aug 21, 2020

This change is critical, since this entire package is useless without this fix.

@drimacus182
Copy link

@tomdyson Is there any reason these simple changes cannot be merged into master? Now Wagalytics package is completely broken with new Wagtail

@xavitorne
Copy link

@tomdyson hi, sorry for disturbing but is it possible to do the merge for this issue? Thanks!

@tomdyson tomdyson merged commit a822b38 into tomdyson:master Dec 10, 2020
@tomdyson
Copy link
Owner

Thanks @cspollar! Sorry for the delay.

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.

Getting request.site.hostname
5 participants