From d45d5c428487607978d83cc600e737d28e8ee5e6 Mon Sep 17 00:00:00 2001 From: Mattia Succurro Date: Thu, 10 Nov 2022 21:54:48 +0100 Subject: [PATCH] add csrf token to forms #2 --- app.py | 2 ++ templates/edit.html | 1 + 2 files changed, 3 insertions(+) diff --git a/app.py b/app.py index c0083ec..b994d93 100644 --- a/app.py +++ b/app.py @@ -189,6 +189,8 @@ class Page(BaseModel): @property def prop(self): return PagePropertyDict(self) + def is_editable(self): + return not self.is_locked class PageText(BaseModel): diff --git a/templates/edit.html b/templates/edit.html index 0510a1c..9de2fd4 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -32,6 +32,7 @@ {% endif %}
+