current
Last change
on this file was
fcf0ef3,
checked in by Borja Lopez <borja@…>, 5 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:
460 bytes
|
Rev | Line | |
---|
[5ec3a0b] | 1 | import transaction |
---|
| 2 | |
---|
| 3 | from ow.models.root import OpenWorkouts |
---|
[fcf0ef3] | 4 | from ow.models.bulk import BulkFiles |
---|
[5ec3a0b] | 5 | from ow.catalog import get_catalog |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | def appmaker(zodb_root): |
---|
| 9 | if 'app_root' not in zodb_root: |
---|
| 10 | app_root = OpenWorkouts() |
---|
[fcf0ef3] | 11 | app_root['_bulk_files'] = BulkFiles() |
---|
[5ec3a0b] | 12 | zodb_root['app_root'] = app_root |
---|
| 13 | transaction.commit() |
---|
| 14 | # initialize the catalog for the first time |
---|
| 15 | get_catalog(app_root) |
---|
| 16 | return zodb_root['app_root'] |
---|
Note: See
TracBrowser
for help on using the repository browser.