You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/files.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ class MyModel(db.Model):
18
18
19
19
In a page using a form:
20
20
21
-
```
21
+
```jpy
22
22
---
23
23
form = page.form()
24
24
def post():
@@ -42,7 +42,7 @@ When accessing the model property, the value is a [file object](https://github.c
42
42
43
43
To generate a url for the file:
44
44
45
-
```
45
+
```jpy
46
46
---
47
47
page.obj = MyModel.get(1)
48
48
---
@@ -72,7 +72,7 @@ files_base_path: bucket_name
72
72
73
73
Use `save_file()` to store a file and get a [file object](https://github.com/hyperflask/flask-files#file-object). File objects are serializable as string or JSON.
Copy file name to clipboardExpand all lines: docs/guides/forms.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Easily define forms that can be validated on the frontend and the backend.
9
9
10
10
Create forms in templates by calling fields on a `form` object as if they would be already declared. The syntax for calling fields is slightly different compared to raw wtforms as it also includes the field type.
11
11
12
-
```
12
+
```jinja
13
13
{# signup.html #}
14
14
<{Form form}>
15
15
<{FormField form.firstname.text("First name") }/>
@@ -37,7 +37,7 @@ To make things easier, when using pages, forms declared inside pages are availab
0 commit comments