Allow displaying SVG images in documentation
commit6587592ee15f325df253a4636219f8dd31652141
authorMagnus Hagander <magnus@hagander.net>
Sun, 31 Mar 2019 12:19:45 +0000 (31 14:19 +0200)
committerMagnus Hagander <magnus@hagander.net>
Sun, 31 Mar 2019 12:26:42 +0000 (31 14:26 +0200)
treeb1d3be1d78da2a8aec016d4a7b81bc296dd1f21b
parenta23b22f8d5e6e5661063b7c4e1c27ab1567be01e
Allow displaying SVG images in documentation

PostgreSQL 12 adds SVG images in the documentation, so the website
should be able to display them.

The images themselves were already loaded by the docsloader, but the
regexps in the URL would block them from being seen. Fix this by
creating a separate function for the SVGs, since we also don't want to
render them inside teh templates.

This new view must also be tagged with @allow_frames, since the browser
considers the <object> tag used to be a subframe. Without this, they
would be blocked from viewing even on our own site.
pgweb/docs/views.py
pgweb/urls.py