Table of Contents

Class: AttachmentField qm/fields.py

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.

Base Classes   
Field
    object
Methods   
FormatValueAsHtml
FormatValueAsText
GetHelp
GetHtmlHelp
GetValueFromDomNode
MakeDomNodeForValue
ParseFormValue
Validate
_FormatSummary
__init__
  FormatValueAsHtml 
FormatValueAsHtml (
        self,
        server,
        value,
        style,
        name=None,
        )

Exceptions   
ValueError, "'value' must be 'None' or an 'Attachment'"
ValueError, style
  FormatValueAsText 
FormatValueAsText (
        self,
        value,
        columns=72,
        )

  GetHelp 
GetHelp ( self )

  GetHtmlHelp 
GetHtmlHelp ( self,  edit=0 )

  GetValueFromDomNode 
GetValueFromDomNode (
        self,
        node,
        attachment_store,
        )

Exceptions   
qm.QMException, qm.error( "dom wrong tag for field", name = self.GetName(), right_tag = "attachment", wrong_tag = node.tagName )
  MakeDomNodeForValue 
MakeDomNodeForValue (
        self,
        value,
        document,
        )

  ParseFormValue 
ParseFormValue (
        self,
        request,
        name,
        attachment_stores,
        )

  Validate 
Validate ( self,  value )

Exceptions   
ValueError, "the value of an attachment field must be an 'Attachment'"
  _FormatSummary 
_FormatSummary ( self,  attachment )

Generate a user-friendly summary for attachment.

This value is used when generating the form. It can't be editied.

  __init__ 
__init__ (
        self,
        name,
        **properties,
        )

Create an attachment field.

Sets the default value of the field to None.


Table of Contents

This document was automatically generated on Mon Jan 3 09:42:29 2005 by HappyDoc version 2.1