Home | Trees | Indices | Help |
---|
|
object --+ | Field --+ | AttachmentField
A field containing a file attachment.
Note that the 'FormatValueAsHtml' method uses a popup upload form for uploading new attachment. The web server must be configured to handle the attachment submission requests. See 'attachment.register_attachment_upload_script'.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
upload_url =
The URL used to upload data for an attachment. |
|||
download_url =
The URL used to download an attachment. |
|||
Inherited from |
|
|||
Inherited from |
|
Create an attachment field. Sets the default value of the field to 'None'.
|
Generate help text about this field in structured text format.
|
Generate help text about this field in HTML format. 'edit' -- If true, display information about editing controls for this field.
|
Return a plain text rendering of a 'value' for this field. 'columns' -- The maximum width of each line of text. returns -- A plain-text string representing 'value'.
|
Return an HTML rendering of a 'value' for this field. 'server' -- The 'WebServer' in which the HTML will be displayed. 'value' -- The value for this field. May be 'None', which renders a default value (useful for blank forms). 'style' -- The rendering style. Can be "full" or "brief" (both read-only), or "new" or "edit" or "hidden". 'name' -- The name to use for the primary HTML form element containing the value of this field, if 'style' specifies the generation of form elements. If 'name' is 'None', the value returned by 'GetHtmlFormFieldName()' should be used. returns -- A string containing the HTML representation of 'value'.
|
Generate a DOM element node for a value of this field. 'value' -- The value to represent. 'document' -- The containing DOM document node.
|
Generate a user-friendly summary for 'attachment'. This value is used when generating the form. It can't be editied. |
Validate a field value. For an acceptable type and value, return the representation of 'value' in the underlying field storage. 'value' -- A value to validate for this field. returns -- If the 'value' is valid, returns 'value' or an equivalent "canonical" version of 'value'. (For example, this function may search a hash table and return an equivalent entry from the hash table.) This function must raise an exception if the value is not valid. The string representation of the exception will be used as an error message in some situations. Implementations of this method must be idempotent.
|
Convert a value submitted from an HTML form. 'request' -- The 'WebRequest' containing a value corresponding to this field. 'name' -- The name corresponding to this field in the 'request'. 'attachment_stores' -- A dictionary mapping 'AttachmentStore' ids (in the sense of Python's 'id' built-in) to the 'AttachmentStore's themselves. returns -- A pair '(value, redisplay)'. 'value' is the value for this field, as indicated in 'request'. 'redisplay' is true if and only if the form should be redisplayed, rather than committed. If an error occurs, an exception is thrown.
|
Return a value for this field represented by DOM 'node'. This method does not validate the value for this particular instance; it only makes sure the node is well-formed, and returns a value of the correct Python type. 'node' -- The DOM node that is being evaluated. 'attachment_store' -- For attachments, the store that should be used. If the 'node' is incorrectly formed, this method should raise an exception.
|
|
upload_urlThe URL used to upload data for an attachment. The upload request will include these query arguments: 'location' -- The location at which to store the attachment data. 'file_data' -- The attachment data.
|
download_urlThe URL used to download an attachment. The download request will include this query argument: 'location' -- The location in the attachment store from which to retrieve the attachment data.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:40 2011 | http://epydoc.sourceforge.net |