Skip to content

Commit 4bd4c69

Browse files
committed
Merge pull request #100 from edx/ned/explain-filesystem-example
Explain the filethumbs example a bit.
2 parents 4e8e713 + cc83df4 commit 4bd4c69

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

sample_xblocks/filethumbs/filethumbs.py

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
"""An XBlock providing thumbs-up/thumbs-down voting.
22
3-
This is a completely artifical test case for the filesystem field type.
3+
This is a completely artifical test case for the filesystem field type. It
4+
behaves just like the sample_xblocks/thumbs example, except it uses filesystem
5+
fields.
6+
7+
Votes are stored in a JSON object in the file system, and up/down arrow PNGs
8+
are constructed as files on-the-fly.
9+
10+
These uses are not great demonstrations of what you can do with a filesystem
11+
field. They should be used for storage of file-like data, usually with
12+
varying file names.
13+
14+
This code is duplicative of much of the thumbs example. If you are interested
15+
in filesystem fields, examining the differences between this block and the
16+
thumbs block will be instructive.
417
5-
Votes are stored in a JSON object in the file system, and up/down arrow PNGs are constructed as files on-the-fly.
618
"""
719

820
import json

0 commit comments

Comments
 (0)