current
Last change
on this file since fcf0ef3 was
fcf0ef3,
checked in by Borja Lopez <borja@…>, 4 years ago
|
(#77) Bulk workouts upload:
- Added a new Folder-like object under the root object to store compressed files
- Added a new Blob-like object to store those compressed files into the database
- Added the needed view/template code to handle adding/uploading compressed files
that may contain workout tracking files + a page to see them per-user
|
-
Property mode set to
100644
|
File size:
486 bytes
|
Line | |
---|
1 | from formencode import Schema, validators |
---|
2 | |
---|
3 | from ow.schemas.blob import FieldStorageBlob |
---|
4 | |
---|
5 | |
---|
6 | class BulkFileSchema(Schema): |
---|
7 | """ |
---|
8 | Schema for a compressed file used to upload workouts in "bulk" mode. |
---|
9 | We ask only for the compressed file. |
---|
10 | """ |
---|
11 | allow_extra_fields = True |
---|
12 | filter_extra_fields = True |
---|
13 | # This one can not be none, it is a required field |
---|
14 | compressed_file = FieldStorageBlob(not_empty=True, |
---|
15 | whitelist=['zip', 'tgz']) |
---|
Note: See
TracBrowser
for help on using the repository browser.