source: OpenWorkouts-current/ow/schemas/bulk.py @ 715671f

current
Last change on this file since 715671f was 715671f, checked in by Borja Lopez <borja@…>, 4 years ago

(#77) Bulk workouts upload:

  • Added methods to extract files from compressed bulk files, then load workouts from those files.
  • Added a task to process/load workouts from "not loaded" bulk files
  • Added full tests coverage
  • Property mode set to 100644
File size: 474 bytes
Line 
1from formencode import Schema
2
3from ow.schemas.blob import FieldStorageBlob
4
5
6class 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.