Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
87dfbad6
Commit
87dfbad6
authored
2 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
mo.web.table: Argumenty requestu mohou být jak ImmutableMultiDict, tak MultiDict
parent
ceaadb45
No related branches found
No related tags found
1 merge request
!127
E-maily školních garantů účastníků
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mo/web/table.py
+3
-3
3 additions, 3 deletions
mo/web/table.py
with
3 additions
and
3 deletions
mo/web/table.py
+
3
−
3
View file @
87dfbad6
...
...
@@ -6,7 +6,7 @@ import io
from
markupsafe
import
Markup
from
typing
import
Any
,
Dict
,
List
,
Sequence
,
Optional
,
Iterable
,
Union
import
urllib.parse
from
werkzeug.datastructures
import
ImmutableMultiDict
from
werkzeug.datastructures
import
MultiDict
,
ImmutableMultiDict
import
werkzeug.exceptions
from
mo.csv
import
FileFormat
...
...
@@ -206,7 +206,7 @@ class Table:
return
Markup
(
"
\n
"
.
join
(
tab
))
def
get_columns_checkboxes
(
self
,
line_prefix
:
str
=
""
,
args
:
Optional
[
ImmutableMultiDict
]
=
None
)
->
Markup
:
def
get_columns_checkboxes
(
self
,
line_prefix
:
str
=
""
,
args
:
Union
[
None
,
MultiDict
,
ImmutableMultiDict
]
=
None
)
->
Markup
:
out
=
[
line_prefix
+
'
<input type=
"
hidden
"
name=
"
do_column_selection
"
value=
"
1
"
>
'
]
for
c
in
self
.
columns
:
if
c
.
in_export
is
None
:
...
...
@@ -251,7 +251,7 @@ class Table:
yield
out
.
getvalue
().
encode
(
fmt
.
get_charset
())
def
send_as
(
self
,
format
:
Union
[
FileFormat
,
str
],
streaming
:
bool
=
False
,
args
:
Optional
[
ImmutableMultiDict
]
=
None
)
->
Response
:
def
send_as
(
self
,
format
:
Union
[
FileFormat
,
str
],
streaming
:
bool
=
False
,
args
:
Union
[
None
,
MultiDict
,
ImmutableMultiDict
]
=
None
)
->
Response
:
try
:
fmt
=
FileFormat
.
coerce
(
format
)
except
ValueError
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment