Commit 1c5da95f authored by gijs's avatar gijs
Browse files

Allow read mode to be loaded in iframes

parent d9cc9c68
......@@ -50,6 +50,8 @@ from ethertoff.forms import RenameFolderForm
from django.views.generic.edit import FormView
from django.urls import reverse_lazy
from django.views.decorators.clickjacking import xframe_options_exempt
# By default, the homepage is the pad called ‘start’ (props to DokuWiki!)
......@@ -523,6 +525,8 @@ def pad_write(request, pad):
def xhtml(request, slug):
return pad_read(request, "r", slug + '.md')
def pad_read(request, mode="r", slug=None):
"""Read only pad
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment