wagtail-livepreview
wagtail-livepreview copied to clipboard
request.site is None in live_preview
Hey.
This app is a nice idea and i'd like to use it in my project (and maybe contribute in a future with some improvements) but currently i have a problem with page in "live preview" mode.
The problem is than in template {{ request.site }} returns None when page is rendered by live_preview endpoint. I have no idea where to find a problem.
Wagtail's vanilla "preview" endpoint works well. Do you have any clues?
I dont recall off the top of my head. A quick browse through the code and I suspect it has to do with something in here: https://github.com/KalobTaulien/wagtail-livepreview/blob/master/livepreview/views.py#L154-L158