wagtail-livepreview icon indicating copy to clipboard operation
wagtail-livepreview copied to clipboard

request.site is None in live_preview

Open Quadric opened this issue 5 years ago • 1 comments

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?

Quadric avatar Oct 28 '19 08:10 Quadric

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

KalobTaulien avatar Jan 09 '20 23:01 KalobTaulien