-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
staticsitegen command fails for documents since commit 918f286 #1183
Comments
Yes, staticsitegen fails using release 1.0b1 and I think a note is necessary. |
Thanks for raising this, @pcraston. We'll look at a fix; in the meantime could you do a PR for a note in the docs? |
I downloaded the zip from (https://github.com/ctxis/django-medusa) and copied the module to a fresh started project mysite. But I still got the following error:
environment: |
We've agreed to investigate ways to make work without medusa patch. See also #1176 |
#1183 add note to staticsitegen documentation
…y using fork of django-medusa to process Documents
This can now be worked around by setting the |
The staticsitegen command uses django-medusa to generate a static version of the wagtail site. Since commit 918f286 wagtail uses StreamingHttpResponse to return Documents, which causes medusa to fail as it simply saves response.content to disk (https://github.com/ctxis/django-medusa/blob/master/django_medusa/renderers/disk.py#L56) and StreamingHttpResponse has no content attribute.
I've pushed a fix to our fork of django-medusa (https://github.com/ctxis/django-medusa) and submitted a pull request (mtigas/django-medusa#20). It iterates over the streaming_response attribute if response is streaming and saves the chunks to file, otherwise it uses response.content.
Until this PR has been merged, do you think it's worth adding a note to the staticsitegen section of the wagtail docs?
The text was updated successfully, but these errors were encountered: