add csrf token to forms #2
This commit is contained in:
parent
891fe36a83
commit
d45d5c4284
2 changed files with 3 additions and 0 deletions
2
app.py
2
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):
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
{% endif %}
|
||||
|
||||
<form method="POST">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<div>
|
||||
<label for="title"><span class="material-icons">link</span> /</label>
|
||||
<input type="text" name="url" class="url-input" placeholder="(No URL)" maxlength="64" value="{{ pl_url or '' }}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue