Skip to content

Commit

Permalink
This should hopefully explain how to use a FileField a bit better
Browse files Browse the repository at this point in the history
  • Loading branch information
Qalthos committed Mar 14, 2012
1 parent 24441df commit 7bb7e02
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tw2/forms/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,16 @@ def validate_python(self, value, outer_call=None):


class FileField(InputField):
""" TODO - this widget needs to be documented. It is complicated. """
"""
A field for uploading files. The returned object has (at least) two
properties of note:
* filename:
the name of the uploaded file
* value:
a bytestring of the contents of the uploaded file, suitable for being
written to disk
"""

type = "file"
validator = FileValidator
Expand Down

0 comments on commit 7bb7e02

Please sign in to comment.