;ò üCc@sèdklZdkZdklZdklZdklZdk l Z l Z l Z l Z lZlZdk lZlZlZdklZdklZd klZd klZd klZd klZd klZdklZdklZdkl Z dk!l"Z"dk#l$Z$dk%l&Z&dk%l'Z'dk%l(Z)dk*l+Z+dk,l-Z-dk.l/Z/dk0l1Z1dk2l3Z3dk2l4Z4dk5l6Z6dk7l8Z8dk9l:Z:dk;l<Z<d k=l>Z>d!k?l@Z@d"k?lAZAd#k?lBZBd$kClDZDd%kElFZFd&kGlHZHd'kGlIZId(kGlJZJd)kGlKZKd*kLlMZMd+kLlNZNd,kLlOZOd-kLlPZPd.kLlQZQd/kLlRZRd0kLlSZSd1kLlTZTd2kLlUZUd3kLlVZVd4kWlXZXd5kYlZZZd6k[l\Z\d7k[l]Z]d8k[l^Z^d9k[l_Z_d:k[l`Z`d;k[laZad<kblcZcd=kbldZdd>kbleZed?kflgZgd@khliZidAkhljZjdBkhlkZkdCkllmZmdDkllnZndEklloZodFkplqZqdGkplrZrdHkplsZsdIktluZulvZvdJkwlxZxy dkyZzWn-e{j o!eddKdLƒe|Z}e~ZnXe€Z}ezi(iZeegZ‚gZƒdMdN>Z„dOZ…dP„Z†dQ„Z‡dRaˆdSe:fdT„ƒYZ‰eme‰ƒdUe‰fdV„ƒYZŠemeŠƒdWeŠfdX„ƒYZ‹dYeŠfdZ„ƒYZŒd[eŒfd\„ƒYZd]eŠfd^„ƒYZŽd_eŠfd`„ƒYZdaeŠfdb„ƒYZdceŠfdd„ƒYZ‘deeŠfdf„ƒYZ’dgeŠfdh„ƒYZ“die‰fdj„ƒYZ”dkeŠfdl„ƒYZ•dmeŠfdn„ƒYZ–doe)fdp„ƒYZ(dqeŒfdr„ƒYZ—dse fdt„ƒYZ˜duee+fdv„ƒYZ™dwe)fdx„ƒYZše"ešƒdyeŠfdz„ƒYZ›dSdUdWdYd[d]d_dadcdedgdidkdmdqdyfZœene‹d{d|d}d~ƒeneŒd{dd}d€ƒened{dd}d‚ƒeneŽd{dƒd}d„ƒened{d_d}d‚ƒened{d…d}d†ƒene‘d{d‡d}dˆƒene’d{d‰d}dŠƒene“d{d‹d}dŒƒene”d{dd}dŽƒene•d{dd}dƒene–d{d‘d}d’ƒene—d{dod}d“ƒene›d{d”d}d•ƒeod–d—ƒeod˜d™ƒeod˜dšeƒeod˜d—e•ƒeod˜d›eŽƒeodœd™ƒeodd—ƒeodžd—eƒeodŸd—ƒeod d—ƒeod¡d™ƒeod¢d™ƒeod£d™ƒeod¤d™ƒeod¥d™ƒeod¦d™ƒeod§d§ƒeod¨d¨ƒeod©d©ƒeodªd™ƒeod«d™ƒdS(¬(s nested_scopesN(sdeepcopy(sescape(sStringIO(sListTypes TupleTypes ClassTypesFileTypesDictTypesIntType(s StringTypes UnicodeTypes StringTypes(sClassSecurityInfo(sgetSecurityManager(saq_base(s aq_parent(saq_inner(sImplicit(sOOBTree(sComputedAttribute(sDateTime(sBase(sInitializeClass(sguess_content_type(sFile(sPdata(sImage(s Traversable(sChangeCacheSettingsPermission(s FileUpload(s ConflictError(s getToolByName(s_getAuthenticatedUser(sCMFCorePermissions(sREFERENCE_CATALOG(sDefaultLayerContainer(sIStorage(s IBaseUnit(sIField(s IObjectField(s IFileField(sILayerContainer(s IVocabulary(sObjectFieldException(sTextFieldException(sFileFieldException(sReferenceException(s BooleanWidget(sCalendarWidget(sComputedWidget(s DecimalWidget(s FileWidget(s ImageWidget(s IntegerWidget(s LinesWidget(s StringWidget(sReferenceWidget(sBaseUnit(s Reference(s DisplayList(s Vocabulary(s className(smapply(sshasattr(scontentDispositionHeader(sERROR(slog(slog_exc(sconfig(sAttributeStorage(sObjectManagedStorage(sReadOnlyStorage(s setSecurity(s registerField(sregisterPropertyType(sValidationChain(sUnknowValidatorError(sFalseValidatorError(s IValidatorsIValidationChain(si18ns1Warning: no Python Imaging Libraries (PIL) found.s8Archetypes based ImageField's don't scale if neccessary.iisreStructuredTextcKszt|ƒtjo_|idƒ}|tjo0y|iƒ}Wq_t j o d}q_Xn|i |ƒ}n|SdS(s!ensure value is an encoded stringsencodingsUTF8N( stypesvalues UnicodeTypeskwargssgetsencodingsNonesinstances getCharsetsAttributeErrorsencode(svaluesinstanceskwargssencoding((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysencodeis cKszt|ƒtjo_|idƒ}|tjo0y|iƒ}Wq_t j o d}q_Xnt ||ƒ}n|SdS(s!ensure value is an unicode stringsencodingsUTF8N( stypesvalues StringTypeskwargssgetsencodingsNonesinstances getCharsetsAttributeErrorsunicode(svaluesinstanceskwargssencoding((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysdecodews isFieldcBsètZdZeefZeƒZhde<de <de<de<df<de <de <de <d e <d e<d e<d e<d d<de i <de i <de ƒ<dd<dd<de<de<df<de<dd<dd<de ƒd?„Z%eid@ƒdA„Z&eidBƒdC„Z'eidDƒdE„Z(eidFƒdG„Z)RS(Hsý Extend `DefaultLayerContainer`. Implements `IField` and `ILayerContainer` interfaces. Class security = public with default access = allow. Class attribute _properties is a dictionary containing all of a field's property values. sold_field_namesrequiredsdefaultsdefault_methods vocabularysenforceVocabularys multiValueds searchables isMetadatasaccessors edit_accessorsmutatorsmodesrwsread_permissionswrite_permissionsstorages generateModesveVcsforcesstypeswidgets validatorssindexs index_methods _at_accessorsschemataslanguageIndependentcKs‰ti|ƒ|tjotd7adt}n||_|ii|i ƒ|ii|ƒ|i ƒ|i ƒ|i d|iƒdS(s‰ Assign name to __name__. Add properties and passed-in keyword args to __dict__. Validate assigned validator(s). isfield.%ssstorageN(sDefaultLayerContainers__init__sselfsnamesNones _field_counts__name__s__dict__supdates _propertiesskwargss _widgetLayers_validationLayers registerLayersstorage(sselfsnameskwargs((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys__init__¶s      scopycCs€tt|ƒƒ}|idƒ|d}|d=t|ƒ}|iƒ|d<|t j o|p |i ƒ}|i ||SdS(s— Return a copy of field instance, consisting of field name and properties dictionary. field name can be changed to given name. s__name__swidgetN( sdictsvarssselfscdictspopswidgetsdeepcopys propertiesscopysnamesNonesgetNames __class__(sselfsnameswidgetscdicts properties((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyscopyÍs    cCs!d|iƒ|i|ifSdS(sZ Return a string representation consisting of name, type and permissions. sN(sselfsgetNamestypesmode(sself((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys__repr__ÝscCs]t|dƒoIt|iƒtttƒfjo|iƒ|_n|ii|ƒndS(sc instantiate the widget if a class was given and call widget.populateProps swidgetN(sshasattrsselfstypeswidgets ClassTypesBases populateProps(sself((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys _widgetLayerãs "cCs®d|iƒ}t|iƒtjo td‚nøti|iƒo |i}nØt i|iƒot |d|iƒ}n¬t|iƒt t t fjout|iƒo[yt |d|iƒ}Wqttfj o)}td|iƒ|fƒf}qXq*f}ntd|iƒf}|i ol|fjot |ƒ}nt|ƒo1|ddiidƒ o|idƒqq¡|idƒn||_d S( s( Resolve that each validator is in the service. If validator is not, log a warning. We could replace strings with class refs and keep things impl the ivalidator in the list. Note: XXX this is not compat with aq_ things like scripts with __call__ s Validator_%ss0Please use the new syntax with validation chainss validatorss(WARNING: Disabling validation for %s: %ss)WARNING: Unknow validation %s. Disabling!isisEmptysisEmptyNoErrorN(sselfsgetNames chainnamestypes validatorssDictTypesNotImplementedErrorsIValidationChainsisImplementedBys IValidatorsValidationChains TupleTypesListTypes StringTypeslensUnknowValidatorErrorsFalseValidatorErrorsmsgslogsrequiredsnames startswithsinsertSufficient(sselfs validatorssmsgs chainname((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys_validationLayerís4       svalidatecKs|iƒ}|o |i|ƒotSn|io.|i|||ƒ}|t j o|Sqcn|i o.|i |||ƒ}|t j o|Sq›n|i|||ƒ}|t j o|Sn|io1|i||||}|tj o|Sqnt SdS(s± Validate passed-in value using all field validators. Return None if all validations pass; otherwise, return failed result returned by validator N(sselfsgetNamesnameserrorsshas_keysTruesrequiredsvalidate_requiredsinstancesvaluesressNonesenforceVocabularysvalidate_vocabularysvalidate_fields validatorssvalidate_validatorsskwargs(sselfsvaluesinstanceserrorsskwargssnamesres((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysvalidates(           svalidate_validatorsc KsQ|io(|i|d|d|d||}nt}|tj o|SndS(s sinstanceserrorssfieldN(sselfs validatorssvaluesinstanceserrorsskwargssresultsTrue(sselfsvaluesinstanceserrorsskwargssresult((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysvalidate_validators=s  svalidate_requiredcCsk| o[|ii|ƒ}|iƒ}ti ddhd|<|dd|ƒ}|||<|Snt SdS(Ns archetypesserror_requiredsnamesdefaults%s is required, please correct.( svaluesselfswidgetsLabelsinstanceslabelsgetNamesnamesi18ns translateserrorserrorssNone(sselfsinstancesvalueserrorssnameslabelserror((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysvalidate_requiredJs   svalidate_vocabularyc Csßt} |oe|} t|ƒtjo |g} n4t|ƒttfjotdt|ƒƒ‚n|i |ƒ}gi }| D]*}|iƒo||i|ƒƒqƒqƒ~} g} xo|D]g}t|ƒttfjo|d}nt|ƒtj ot|ƒ}n| i |i|ƒƒqÃWxA| D]5}t} x&| D]}||jo t} PqHqHWq5Wn| o^|ii|ƒ}tiddhd|<d|<|dd||fƒ||iƒ<} n| Sd S( sKMake sure value is inside the allowed values for a given vocabularysField value type error: %sis archetypesserror_vocabularysvalsnamesdefaults5Value %s is not allowed for vocabulary of element %s.N(sNoneserrorsvaluesvaluesstypes STRING_TYPESs TupleTypesListTypes TypeErrorsselfs Vocabularysinstancesvocabsappends_[1]svsstrips unicodeEncodesvalidssstrsvalsTrueswidgetsLabelslabelsi18ns translateserrorssgetName( sselfsinstancesvalueserrorssvocabsvalsvslabels_[1]svaluesserrorsvalids((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysvalidate_vocabularyYs@ A  (s VocabularycCsæ|i}t|tƒ o|tj ot|ƒtjo^t ||tƒ}|o t |ƒo4g}hd|<d|<}t|||Ž}qÈn1|tj o ti|ƒo|i|ƒ}n|d }t|tƒoq›t|ƒttfjoG|ot|dƒttfjot||ƒ}nt|ƒ}q›t|ƒot|dƒtjott||ƒƒ}q›tdƒt|ƒn|o<t |dtƒpt |idtƒ}t|||ƒSn|SdS(s° Returns a DisplayList. Uses self.vocabulary as source. 1) Static vocabulary - is already a DisplayList - is a list of 2-tuples with strings (see above) - is a list of strings (in this case a DisplayList with key=value will be created) 2) Dynamic vocabulary: - precondition: a content_instance is given. - has to return a: * DisplayList or * list of strings or * list of 2-tuples with strings: '[("key1","value 1"),("key 2","value 2"),]' - the output is postprocessed like a static vocabulary. - vocabulary is a string: if a method with the name of the string exists it will be called - vocabulary is a class implementing IVocabulary: the "getDisplayList" method of the class will be called. scontent_instancesfieldiisUnhandled type in Vocabs i18n_domainN(sselfs vocabularysvalues isinstances DisplayListscontent_instancesNonestypes STRING_TYPESsgetattrsmethodscallablesargsskwsmapplys IVocabularysisImplementedBysgetDisplayListssamples TupleTypesListTypeszipslens StringTypeslogswidgets i18n_domains Vocabulary(sselfscontent_instancessamples i18n_domainsmethodsargssvalueskw((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys Vocabulary„s4    $$ (scheckPermissioncCsg|ddddfjo |i}n+|ddddfjo |i}ntStƒi||ƒSd S( sú Check whether the security context allows the given permission on the given object. Arguments: mode -- 'w' for write or 'r' for read instance -- The object being accessed according to the permission swswriteseditssetsrsreadsviewsgetN( smodesselfswrite_permissionspermsread_permissionsNonesgetSecurityManagerscheckPermissionsinstance(sselfsmodesinstancesperm((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyscheckPermissionÔs   s writeablecCsÜd|ijo0|o!td|i|iƒfƒntSn|i|ƒ}| o*|otd|i |fƒntSn|i d|ƒ o?|o0tdt |ƒi ƒ|i|iƒfƒntSntSdS(Nsws1Tried to update %s:%s but field is not writeable.sNo method %s on %s.seditsBUser %s tried to update %s:%s but doesn't have enough permissions.(sselfsmodesdebugslogsinstances portal_typesgetNamesFalses getMutatorsmethodsmutatorscheckPermissions_getAuthenticatedUsersgetIdsTrue(sselfsinstancesdebugsmethod((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys writeableès!0scheckExternalEditorcCsnt|dƒ}t|dtƒ}|tj o8t|dtƒo|iddd|ƒotSqfntSdS(sc Checks if the user may edit this field and if external editor is enabled on this instance sportal_propertiesssite_propertiess ext_editorsmodeseditsinstanceN( s getToolByNamesinstancesppsgetattrsNonesspsselfscheckPermissionsTrue(sselfsinstancesppssp((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyscheckExternalEditorÿs , s getWidgetNamecCs|iiƒSdS(sLReturn the widget name that is configured for this field as a stringN(sselfswidgetsgetName(sself((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys getWidgetName ssgetNamecCs |iSdS(s)Return the name of this field as a stringN(sselfs__name__(sself((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetNamessgetTypecCst|ƒSdS(s)Return the type of this field as a stringN(s classNamesself(sself((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetTypess getDefaultcCs“|i}|oxt|ƒtjo t||ƒot||ƒ}|ƒSqt |ƒo |ƒSqt d|i ƒ|i fƒ‚n|i SdS(sGReturn the default value to be used for initializing this fields:%s.default_method is neither a method of %s nor a callableN(sselfsdefault_methodsdmstypes StringTypesshasattrsinstancesgetattrsmethodscallables ValueErrorsgetNames __class__sdefault(sselfsinstancesdmsmethod((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys getDefaults #   #s getAccessorcCs)|iot||itƒSntSdS(sEReturn the accessor method for getting data out of this fieldN(sselfsaccessorsgetattrsinstancesNone(sselfsinstance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys getAccessor/s sgetEditAccessorcCs)|iot||itƒSntSdS(sdReturn the accessor method for getting raw data out of this field e.g.: for editing N(sselfs edit_accessorsgetattrsinstancesNone(sselfsinstance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetEditAccessor7s s getMutatorcCs)|iot||itƒSntSdS(sKReturn the mutator method used for changing the value of this fieldN(sselfsmutatorsgetattrsinstancesNone(sselfsinstance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys getMutator@s stoStringcCsŸd|ii|if}|iiƒ}|iƒxX|D]P}t |||i|ƒ}|djo|ii}n|d||f}q9W|d}|SdS(sïUtility method for converting a Field to a string for the purpose of comparing fields. This comparison is used for determining whether a schema has changed in the auto update function. Right now it's pretty crude.s %s(%s): {swidgets%s:%s,s}N( sselfs __class__s__name__sss _propertiesskeyss sorted_keysssortsksgetattrsvalue(sselfs sorted_keyssksssvalue((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pystoStringHs   sisLanguageIndependentcCs |iSdS(s:Get the language independed flag for i18n content N(sselfslanguageIndependent(sselfsinstance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysisLanguageIndependentZss getI18nDomaincCsdS(sc Checks if the user may edit this field and if external editor is enabled on this instance N((sself((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys getI18nDomain`s(*s__name__s __module__s__doc__sIFieldsILayerContainers__implements__sClassSecurityInfossecuritysNonesFalsesCMFCorePermissionssViewsModifyPortalContentsAttributeStorages StringWidgets _propertiess__init__sdeclarePrivatescopys__repr__s _widgetLayers_validationLayers declarePublicsvalidatesvalidate_validatorssvalidate_requiredsvalidate_vocabularys VocabularyscheckPermissionsTrues writeablescheckExternalEditors getWidgetNamesgetNamesgetTypes getDefaults getAccessorsgetEditAccessors getMutatorstoStringsisLanguageIndependents getI18nDomain(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysField‡s\   ð"     .      *  O                        s ObjectFieldcBsOtZdZeefZeiiƒZei hdd<dd<ƒe ƒZ e i dƒd„Z e i dƒd„Ze i d ƒd „Ze i d ƒd „Ze i d ƒd„Ze i dƒed„Ze idƒed„Ze idƒed„Ze i dƒd„Ze idƒed„Ze idƒd„ZRS(sÕBase Class for Field objects that fundamentaly deal with raw data. This layer implements the interface to IStorage and other Field Types should subclass this to delegate through the storage layer. stypesobjectsdefault_content_typesapplication/octet-streamsgetcKs¦|iƒ||f}y0||d<|i|ƒi|iƒ||SWnZtj oN|idtƒ o&|i ||i |ƒdt |n|i |ƒSnXdS(Nsfields_initializing_( sselfsgetNamesinstanceskwargss__traceback_info__s getStoragesgetsAttributeErrorsFalsessets getDefaultsTrue(sselfsinstanceskwargss__traceback_info__((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetys &&sgetRawcKs’|itj o|i|ƒ}nt}|ihd|<d|idtƒ<ƒ|tjo |g}t |i||ŽSnt ||SdS(Nsfieldsencoding( sselfsaccessorsNones getAccessorsinstanceskwargssupdatesgetsargssmapply(sselfsinstanceskwargssargssaccessor((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetRaw…s+  ssetcKsy||d<|idt|ddƒƒ|dsreadsseeks __class__s%Value is not File or String (%s - %s)s/s\s:istext/x-unknown-content-typesmimetypes_registrysmimetypei s;i(,sfilesNonesselfs _make_filesgetNamesinstances IBaseUnitsisImplementedBysvaluesgetContentTypesmimetypes getFilenamesfilenamesgetRaws isinstances content_classsgetattrsgetIdsFilesdatas FileUploadsshasattrsFileTypesnames basestringsPdatasklasssFileFieldExceptionstypesmaxsrfinds manage_uploadsbodys getToolByNamesmtrskwsdsfsguess_content_typesencsstrssplitsstripssetattr(sselfsvaluesfilesdefaultsmimetypesinstancesfilenameskwargssbodysencsdsfsmtrskwsklass((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys_process_input/s`      0          cKsF|iddƒ}t|tƒoe|iddƒ}|tjot|||ƒ\}}n| o|||fSn|||fSn4t i |ƒo#|i ƒ|iƒ|iƒfSnt|ƒ}t|tƒo_t|d|iƒƒ}|i}|i}t|ƒdjo|||fSq5|||fSnd||fSdS(Nsfilenamesi(skwargssgetsfilenames isinstancesvalues basestringsmimetypesNonesguess_content_typesencsdefaults IBaseUnitsisImplementedBysgetRawsgetContentTypes getFilenamesaq_basesFilesgetattrsgetIds content_typesdataslen(sselfsvaluesdefaultsmimetypeskwargssencsfilenamesdata((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys _migrate_oldss& #   cCs|i|||ƒSdS(N(sselfs content_classsidstitlesfile(sselfsidstitlesfilesinstance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys _make_filessgetcKs‰ti|||}|ot||iƒ o|i||ƒ}nt |ddt ƒo|idt ƒ o|i |ƒSn|SdS(Ns__of__sacquires unwrapped( s ObjectFieldsgetsselfsinstanceskwargssvalues isinstances content_classs _wrapValuesshasattrsTruesFalses__of__(sselfsinstanceskwargssvalue((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysget‘s *ssetc Ksö|djoBt|dƒott|ƒdƒnti|||dSn|i dƒ ot |d         cKs¾t||iƒo|Sn|id|iƒ}|iddƒ}|i |i ƒddd|d|ƒ}t |d|ƒt |d|ƒyt|dƒWnttfj onX|SdS( sAWraps the value in the content class if it's not wrapped smimetypesfilenamesstitlesfilesinstances content_typeN(s isinstancesvaluesselfs content_classskwargssgetsdefault_content_typesmimetypesfilenames _make_filesgetNamesinstancesobjssetattrsdelattrsKeyErrorsAttributeError(sselfsinstancesvalueskwargssmimetypesobjsfilename((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys _wrapValueÖss getBaseUnitcCsß|i|dtƒ}| o d}n|i|dtƒ}|i|ƒp |i|ƒ}t t |ƒt ƒoB|i }|ot|ƒ}q³t |tƒ o |i }q³nt|t |ƒ|d|d|ƒ}|SdS(sDReturn the value of the field wrapped in a base unit object s fromBaseUnitssfilenamesmimetypeN(sselfs getFilenamesinstancesFalsesfilenamesgetContentTypesmimetypesgetRaws getDefaultsvalues isinstancesaq_basesFilesdatasfullsstrs basestringsBaseUnitsbu(sselfsinstancesfullsmimetypesbusvaluesfilename((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys getBaseUnités  s getFilenamecCsšt}|o|i|ƒ}|iƒSn|i|ƒ}t t |ƒdtƒ}|tjot |dtƒ}n|o|i dƒd}n|SdS(s1Get file name of underlaying file object sfilenames\iÿÿÿÿN( sNonesfilenames fromBaseUnitsselfs getBaseUnitsinstancesbus getFilenamesgetRawsrawsgetattrsaq_basessplit(sselfsinstances fromBaseUnitsrawsfilenamesbu((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys getFilenames s setFilenamecCs0|i|ƒ}|i|ƒ|i||ƒdS(s(Set file name in the base unit. N(sselfs getBaseUnitsinstancesbus setFilenamesfilenamesset(sselfsinstancesfilenamesbu((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys setFilenames svalidate_requiredcs5tˆd‡d†ƒƒ‰ti||ˆ|ƒSdS(Nsget_sizecsˆo tˆƒS(N(svaluesstr((svalue(s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyss(sgetattrsvalues ObjectFieldsvalidate_requiredsselfsinstanceserrors(sselfsinstancesvalueserrors((svalues?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysvalidate_requiredssdownloadcCs˜|i|ƒ}| o |i}n| o |i}n|i|ƒ}|tj o/t d|i ƒd|ƒ}|i d|ƒn|i ||ƒSdS(s^Kicks download. Writes data including file name and content type to RESPONSE s attachmentsfilenamesContent-dispositionN(sselfsgetsinstancesfilesREQUESTsRESPONSEs getFilenamesfilenamesNonescontentDispositionHeaders getCharsets header_values setHeaders index_html(sselfsinstancesREQUESTsRESPONSEsfilenamesfiles header_value((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysdownload"s   sget_sizecCsD|i|ƒ}t||iƒo|iƒSntt|ƒƒSdS(sDGet size of the stored data used for get_size in BaseObject N( sselfsgetsinstancesfiles isinstances content_classsget_sizeslensstr(sselfsinstancesfile((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysget_size3s ($s__name__s __module__s__doc__s IFileFieldsILayerContainers__implements__s ObjectFields _propertiesscopysupdatesFalses FileWidgetsFilesClassSecurityInfossecuritysdeclarePrivatessetContentTypes declarePublicsTruesgetContentTypesNones_process_inputs _migrate_olds _make_filesgetssets _wrapValues getBaseUnits getFilenames setFilenamesvalidate_requiredsdeclareProtectedsCMFCorePermissionssViewsdownloadsget_size(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys FileField s:  C    D   :          s TextFieldcBsGtZdZeiZeiiƒZeihdd<dd<de<dd<dd<d df<d e <d e <ƒe ƒZ e i d ƒd „Ze idƒd„ZeiiZdded„Zeeeed„Ze idƒe d„Ze idƒee d„Ze idƒd„Ze i dƒd„ZRS(sIBase Class for Field objects that rely on some type of transformationstypestextsdefaultsswidgetsdefault_content_types text/plainsdefault_output_typesallowable_content_typessprimarys content_classs defaultViewcCs |iSdS(N(sselfsdefault_output_type(sself((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys defaultViewQsssetContentTypecCs]|i|dtƒ}t|dƒo$|i||ƒ|i||ƒnt ddt ƒdS(s'Set mimetype in the base unit. srawssetContentTypes.Did not get a BaseUnit to set the content typeslevelN( sselfsgetsinstancesTruesbusshasattrssetContentTypesvaluessetslogsERROR(sselfsinstancesvaluesbu((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyssetContentTypeUscCs|i|d|d|ƒSdS(Nsfilesinstance(sselfs content_classsidsfilesinstance(sselfsidstitlesfilesinstance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys _make_filebscKsû|tjo+|i|iƒddddd|ƒ}n|idƒpd}t} t i |ƒo7|i ƒp|}|iƒp|}|||fSnót||iƒo;t|d|iƒƒ}t|d|ƒ}|||fSn¥t|tƒo7t|d|iƒƒ}t|d|ƒ}|i}n^t|tƒp t|dƒo)|i}|itƒ} |idƒnt|tƒp t|dƒoG|p|i}|d jo d}n|itƒ} |idƒn®t|tƒonšt|tƒon†t|d ƒo t|d ƒo |itƒ} |idƒnF|tjo d}n/t|d tƒ}t d t!|ƒ|fƒ‚t|tƒot"|ƒ}n|t#|i$dƒ|i$dƒ|i$dƒƒd}|tjp |djoŠ| tjo|t } nt%|dtƒ} | tj o4hdt<d|<} | | | \} } }q†t*|| |ƒ\}}nt"|ƒi,dƒd}|i-||d|d|ƒ|i.||ƒ|i/|ƒ|t"|i ƒƒ|iƒfSdS(Nstitlessfilesinstancesfilenames content_typeisnamessreadsseeks __class__s%Value is not File or String (%s - %s)s/s\s:istext/x-unknown-content-typesmimetypes_registrysmimetypes;(0sfilesNonesselfs _make_filesgetNamesinstanceskwargssgetsfilenamesbodys IBaseUnitsisImplementedBysvaluesgetContentTypesmimetypes getFilenames isinstances content_classsgetattrsgetIdsFilesdatas FileUploadsshasattrsreadsCHUNKsseeksFileTypesnames basestringsPdatasklasssTextFieldExceptionstypesstrsmaxsrfinds getToolByNamesmtrskwsdsfsguess_content_typesencssplitsupdatessetContentTypes setFilename(sselfsvaluesfilesdefaultsmimetypesinstanceskwargssencsfilenamesbodysdsfsmtrskwsklass((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys_process_inputesp              sgetRawcKsv|i|dt|}|pti|ƒ o|Snhd|idƒ<d|<}g}t |i ||ŽSdS(sS If raw, return the base unit object, else return encoded raw data srawsencodingsinstanceN( sselfsgetsinstancesTrueskwargssvaluesraws IBaseUnitsisImplementedByskwsargssmapplysgetRaw(sselfsinstancesrawskwargssargssvalueskw((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetRawµs!sgetcKs‰y_||d<|i|ƒ}|i|iƒ||}ti |ƒ o|i ||ƒ}nWnht j o\|idt ƒ o&|i ||i|ƒdt|n|i ||i|ƒƒ}nX|o|Sn|tjo|ipd}nt|dƒ ot|ƒSn|i||d|idtƒƒ}| o |djo(|i|dd|idtƒƒ}n|pdSdS(sg If raw, return the base unit object, else return value of object transformed into requested mime type. If no requested type, then return value in default type. If raw format is specified, try to transform data into the default output type or to plain text. If we are unable to transform data, return an empty string. sfields_initializing_s text/plains transformsencodingsN(sselfskwargss getStoragesinstancesstoragesgetsgetNamesvalues IBaseUnitsisImplementedBys _wrapValuesAttributeErrorsFalsessets getDefaultsTruesrawsmimetypesNonesdefault_output_typesshasattrsstrs transformsdata(sselfsinstancesmimetypesrawskwargssstoragesvaluesdata((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetÂs0     s getBaseUnitcCs|i|dtƒSdS(sDReturn the value of the field wrapped in a base unit object srawN(sselfsgetsinstancesTrue(sselfsinstance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys getBaseUnitçssget_sizecCst|i|ƒƒSdS(sDGet size of the stored data used for get_size in BaseObject N(slensselfs getBaseUnitsinstance(sselfsinstance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysget_sizeís(s__name__s __module__s__doc__s FileFields__implements__s _propertiesscopysupdates StringWidgetsFalsesBaseUnitsClassSecurityInfossecuritys declarePublics defaultViewsdeclarePrivatessetContentTypes ObjectFieldsgetContentTypesim_funcsNones _make_files_process_inputsgetRawsgets getBaseUnitsget_size(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys TextField<s(  X     O  $   s DateTimeFieldcBsdtZdZeiZeiiƒZeihdd<de <ƒe ƒZ e i dƒd„Z RS(s#A field that stores dates and timesstypesdatetimeswidgetssetcKsa| o t}n6t|tƒ o$yt|ƒ}WqGt}qGXnti||||dS(s¾ Check if value is an actual date/time value. If not, attempt to convert it to one; otherwise, set to None. Assign all properties passed as kwargs to object. N( svaluesNones isinstancesDateTimes ObjectFieldssetsselfsinstanceskwargs(sselfsinstancesvalueskwargs((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyssetÿs (s__name__s __module__s__doc__s ObjectFields__implements__sFields _propertiesscopysupdatesCalendarWidgetsClassSecurityInfossecuritysdeclarePrivatesset(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys DateTimeFieldòs    s LinesFieldcBs¯tZdZeiZeiiƒZeihdd<df<de <ƒe ƒZ e i dƒd„Z e i dƒd„Ze i d ƒd „Ze id ƒd „ZRS( sFor creating lines objectsstypeslinessdefaultswidgetssetcKs½|t|ƒf}t|ƒtjo|idƒ}ngi}|D]:}|o |iƒo |t |iƒ||ƒqFqF~}t i ot|ƒ}nti||||dS(s´ If passed-in value is a string, split at line breaks and remove leading and trailing white space before storing in object with rest of properties. s N(svaluestypes__traceback_info__s STRING_TYPESssplitsappends_[1]svsstripsdecodesinstanceskwargssconfigsZOPE_LINES_IS_TUPLE_TYPEstuples ObjectFieldssetsself(sselfsinstancesvalueskwargssvs__traceback_info__s_[1]((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyssetsQ sgetcKsoti|||pf}gi}|D]}|t |||ƒq*~}t i ot |ƒSn|SdS(N(s ObjectFieldsgetsselfsinstanceskwargssvaluesappends_[1]svsencodesdatasconfigsZOPE_LINES_IS_TUPLE_TYPEstuple(sselfsinstanceskwargssvsvalues_[1]sdata((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysget-s 3 sgetRawcKs|i||SdS(N(sselfsgetsinstanceskwargs(sselfsinstanceskwargs((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetRaw6ssget_sizecCs>d}x-|i|ƒD]}|tt|ƒƒ7}qW|SdS(sDGet size of the stored data used for get_size in BaseObject iN(ssizesselfsgetsinstanceslineslensstr(sselfsinstanceslinessize((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysget_size:s (s__name__s __module__s__doc__s ObjectFields__implements__sFields _propertiesscopysupdates LinesWidgetsClassSecurityInfossecuritysdeclarePrivatessetsgetsgetRaws declarePublicsget_size(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys LinesFields  (        s IntegerFieldcBsŒtZdZeiZeiiƒZeihdd<dd<de <de <ƒe ƒZ e i dƒd„Ze i d ƒd „ZRS( sA field that stores an integerstypesintegerssizes10swidgetsdefaultsvalidate_requiredcCsPyt|ƒWnttfj o t}nXt}ti||||ƒSdS(N( sintsvalues ValueErrors TypeErrorsFalsesresultsTrues ObjectFieldsvalidate_requiredsselfsinstanceserrors(sselfsinstancesvalueserrorssresult((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysvalidate_requiredRs  ssetcKsf|djo t}n6|tj o(|iƒ|||f}t|ƒ}nti ||||dS(Ns( svaluesNonesselfsgetNamesinstanceskwargss__traceback_info__sints ObjectFieldsset(sselfsinstancesvalueskwargss__traceback_info__((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysset\s    (s__name__s __module__s__doc__s ObjectFields__implements__sFields _propertiesscopysupdates IntegerWidgetsNonesClassSecurityInfossecuritysdeclarePrivatesvalidate_requiredsset(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys IntegerFieldCs  1   s FloatFieldcBsqtZdZeiiƒZeihdd<de<ƒeƒZ e i dƒd„Z e i dƒd„Z RS(sA field that stores floatsstypesfloatsdefaultsvalidate_requiredcCsPyt|ƒWnttfj o t}nXt}ti||||ƒSdS(N( sfloatsvalues ValueErrors TypeErrorsFalsesresultsTrues ObjectFieldsvalidate_requiredsselfsinstanceserrors(sselfsinstancesvalueserrorssresult((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysvalidate_requiredqs  ssetcKsf|djo t}n6|tj o(|iƒ|||f}t|ƒ}nti ||||dS(sJConvert passed-in value to a float. If failure, set value to None.sN( svaluesNonesselfsgetNamesinstanceskwargss__traceback_info__sfloats ObjectFieldsset(sselfsinstancesvalueskwargss__traceback_info__((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysset|s   ( s__name__s __module__s__doc__sFields _propertiesscopysupdatesNonesClassSecurityInfossecuritysdeclarePrivatesvalidate_requiredsset(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys FloatFieldfs    sFixedPointFieldcBs´tZdZeiZeiiƒZeihdd<dd<dd<de <dd <ƒe ƒZ d „Z e i d ƒd „Ze i d ƒd„Ze i dƒd„ZRS(s4A field for storing numerical data with fixed pointsstypes fixedpoints precisionisdefaults0.00swidgets validatorss isDecimalcCsä| o|i|ƒ}n|iddƒ}|idƒ}||f}t|ƒdjot|dƒdf}nh|d|i }|d|i t|ƒ7}|ddjod|d>> for node in range(3): ... _ = self.folder.invokeFactory('Refnode', 'n%s' % node) Use set with a list of objects: >>> nodes = self.folder.n0, self.folder.n1, self.folder.n2 >>> nodes[0].setLinks(nodes[1:]) >>> nodes[0].getLinks() [, ] Use it with None or () to delete references: >>> nodes[0].setLinks(None) >>> nodes[0].getLinks() [] Use a list of UIDs to set: >>> nodes[0].setLinks([n.UID() for n in nodes[1:]]) >>> nodes[0].getLinks() [, ] >>> nodes[0].setLinks(()) >>> nodes[0].getLinks() [] Setting multiple values for a non multivalued field will fail: >>> nodes[1].setLink(nodes) Traceback (most recent call last): ... ValueError: Multiple values ... Keyword arguments may be passed directly to addReference(), thereby creating properties on the reference objects: >>> nodes[1].setLink(nodes[0].UID(), foo='bar', spam=1) >>> ref = nodes[1].getReferenceImpl()[0] >>> ref.foo, ref.spam ('bar', 1) Empty BTreeFolders work as values (#1212048): >>> _ = self.folder.invokeFactory('SimpleBTreeFolder', 'btf') >>> nodes[2].setLink(self.folder.btf) >>> nodes[2].getLink() is0Multiple values given for single valued field %rsreferenceClasssschemaN(*s getToolByNamesinstancesREFERENCE_CATALOGstoolsappends_[1]s getReferencessselfs relationshipsrefs targetUIDs targetUIDssvaluesNones isinstancesListTypes TupleTypes multiValuedslens ValueErrorsuidssvstypes STRING_TYPESsUIDsaddstssubskwargsscopys addRef_kws setdefaultsreferenceClassshas_keysuids__traceback_info__s addReferencesdeleteReferencescallStorageOnSets ObjectFieldssetsgetRaw(sselfsinstancesvalueskwargssuidssubsaddstools__traceback_info__s targetUIDssuidssrefs_[1]stsvs addRef_kw((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysset s<59   ?8   sgetRawc Ks‘t|tƒ}|d|iƒd|iƒ}gi}|D]}||i ƒq;~}|i o| o|o|d}q‰t}n|SdS(sRReturn the list of UIDs referenced under this fields relationship s sourceUIDs relationshipiN(s getToolByNamesinstancesREFERENCE_CATALOGsrcsUIDsselfs relationshipsbrainssappends_[1]sbs targetUIDsress multiValuedsaslistsNone( sselfsinstancesaslistskwargssbsressbrainss_[1]src((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetRawms* s VocabularycCs5|ioti||ƒSn|i|ƒiƒSdS(s-Use vocabulary property if it's been defined.N(sselfs vocabularys ObjectFields Vocabularyscontent_instances _Vocabularys sortedByValue(sselfscontent_instance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys Vocabulary}s cCsŽt}t|dƒo |i}nt|dƒo |idjo |i}n|tj ot|ƒtjot||ƒSnt d‚dS(s? ensure the brain has a title or an id and return it as unicodesgetIdsTitlessBrain has no title or idN( sNonestitlesshasattrsbrainsgetIdsTitlestypes StringTypessdecodesinstancesAttributeError(sselfsbrainsinstancestitle((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys_brains_title_or_id„s    c sÞg}tˆdƒ} tˆtiƒ}tˆdƒ} ˆi }t ˆdt ƒ}|ot ˆ|ƒ}|ˆƒ}n|o hd|tiddd dd ˆd dƒ}|i1dd|fƒnˆˆi2ƒ|f}t4|ƒSdS(Nsportal_catalogs portal_urlsallowed_types_methods portal_typecstˆihd|<ƒS(Nsb(sevalsselfsvocabulary_custom_labelsb(sb(sself(s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys¡siÿÿÿÿsdomains archetypessmsgidslabel_atscontextsdefaultsatcs#dˆi|ˆƒˆ|iƒfS(Nu%s %s %s(sselfs_brains_title_or_idsbscontent_instancesatsgetPath(sb(sselfscontent_instancesat(s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys¦scsˆi|ˆƒS(N(sselfs_brains_title_or_idsbscontent_instance(sb(sselfscontent_instance(s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys©sicCsd||iƒfS(Ns%s/%s(spsbsgetPath(sbsp((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys³sspathscBrain for the object at %s doesn't have an UID assigned with. Please update your reference catalog!slabel_no_referencesis(5spairss getToolByNamescontent_instancespcsconfigs UID_CATALOGsucspurlsselfs allowed_typessgetattrsNonesallowed_types_methodsmethsskws searchResultssbrainssvocabulary_custom_labelslabelsvocabulary_display_path_boundslensi18ns translatesats getPortalPaths portal_bases path_offsets abs_pathssabs_pathsappends_[1]sbsupdateskeyss pc_brainssgetPathsb_pathspathsreferenceReferencessFalsesfindsREFERENCE_ANNOTATIONshas_keysUIDsuidsReferenceExceptionsrequireds multiValueds no_referencesinsertsgetNames__traceback_info__s DisplayList(sselfscontent_instancesuids portal_basesb_pathsallowed_types_methodsatsmethsskwsabs_pathslabelspcspurls abs_pathssbrainsspairss__traceback_info__s no_referencespaths allowed_typess path_offsetsbs_[1]s pc_brainssuc((sselfscontent_instancesats?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys _Vocabulary‘sV &  =  )  !  sget_sizecCsdSdS(sDGet size of the stored data used for get_size in BaseObject iN((sselfsinstance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysget_sizeÞs(s__name__s __module__s__doc__s ObjectFields__implements__sFields _propertiesscopysupdatesNonesReferenceWidgets ReferencesFalsesClassSecurityInfossecuritysdeclarePrivatesgetssetsgetRaws declarePublics Vocabularys_brains_title_or_ids _Vocabularysget_size(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysReferenceFieldÑs"  y     a     L s ComputedFieldcBs®tZdZeiZeiiƒZeihdd<de<de <dd<de ƒ<ƒe ƒZ e i dƒd „Ze i d ƒd „Ze id ƒd „ZRS(s,A field that stores a read-only computation.stypescomputeds expressionswidgetsmodesrsstoragessetcOsdS(N((sselfsignoredskwargs((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyssetôssgetcKs&t|ihd|<d|<ƒSdS(sReturn the computed value.scontextshereN(sevalsselfs expressionsinstance(sselfsinstanceskwargs((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetøssget_sizecCsdSdS(sOGet size of the stored data. Used for get_size in BaseObject. iN((sselfsinstance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysget_sizeýs(s__name__s __module__s__doc__sFields__implements__s _propertiesscopysupdatesNonesComputedWidgetsReadOnlyStoragesClassSecurityInfossecuritysdeclarePrivatessetsgets declarePublicsget_size(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys ComputedFieldäs  =      s BooleanFieldcBsƒtZdZeiZeiiƒZeihdd<de <de <ƒe ƒZ e i dƒd„Ze idƒd„ZRS( s#A field that stores boolean values.stypesbooleansdefaultswidgetssetcKs?| p |djo t}nt}ti||||dS(sZIf value is not defined or equal to 0, set field to false; otherwise, set to true.s0N(svaluesFalsesTrues ObjectFieldssetsselfsinstanceskwargs(sselfsinstancesvalueskwargs((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyssets  sget_sizecCstSdS(sDGet size of the stored data used for get_size in BaseObject N(sTrue(sselfsinstance((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysget_sizes(s__name__s __module__s__doc__s ObjectFields__implements__sFields _propertiesscopysupdatesNones BooleanWidgetsClassSecurityInfossecuritysdeclarePrivatessets declarePublicsget_size(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys BooleanFields  (   sCMFObjectFieldcBs¶tZdZeiZeiiƒZeihdd<dd<de <dd<de <d e ƒ<d e <ƒe ƒZe d „Zeid ƒd „Zeidƒd„ZRS(s COMMENT TODO stypesobjects portal_typesFilesdefaultsdefault_mime_typesapplication/octet-streamswidgetsstorages workflowablecKsí|t|ƒf}t|ƒtj oŸt|tƒo |idjpt|tƒo |idjoF|i ddƒ|i ƒ}|i dƒ|djo|Sn|Sn|t jo|SqÝn|djo|Sn|Stdƒ‚dS(NsiÿÿÿÿiisValue is not File or String(svaluestypes__traceback_info__s StringTypes isinstances FileUploadsfilenamesFileTypesnamesseekstellssizesdefaultsNonesObjectFieldException(sselfsvaluesdefaultskwargss__traceback_info__ssize((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys_process_input3s@      sgetc Ksy&|i|ƒi|iƒ||SWnétj oÝt|dtƒ}|tjod}t|ƒ‚n|i }|i |ƒ}|tjotd|ƒ‚nt|dƒ otd|ƒ‚n||iƒg}xddgD] }||=qéWt|i||ŽSnXdS(Ns portal_typess0Coudln't get portal_types tool from this contextsNo such content type: %ssconstructInstances!Cannot construct content type: %ssfieldsschema(sselfs getStoragesinstancesgetsgetNameskwargssAttributeErrors getToolByNamesNonesttsmsgs portal_types type_names getTypeInfosinfos ValueErrorsshasattrsargssksmapplysconstructInstance( sselfsinstanceskwargssinfosargss type_namesmsgsttsk((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetKs$&     ssetcKsi|i||}|i|d|i|ƒ|}|tjp |djodSn|i d|ƒdS(Nsdefaultssfile( sselfsgetsinstanceskwargssobjs_process_inputsvalues getDefaultsNonesedit(sselfsinstancesvalueskwargssobj((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyssetas !(s__name__s __module__s__doc__s ObjectFields__implements__sFields _propertiesscopysupdatesNones FileWidgetsObjectManagedStoragesTruesClassSecurityInfossecuritys_process_inputsdeclarePrivatesgetsset(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysCMFObjectField!s  O     sImagecBs<tZeƒZd„ZeedƒZeZZd„ZRS(NcCsHtt|ƒƒ}|tj o|iƒp |iƒSn|iƒSdS(N(s aq_parentsaq_innersselfsparentsNonesTitlesgetId(sselfsparent((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pystitlews icCstSdS(N(sTrue(sself((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysisBinarys( s__name__s __module__sClassSecurityInfossecuritystitlesComputedAttributesalts title_or_idsisBinary(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysImagess    s ImageFieldc BstZdZeiiƒZeihdd<dd<de<de<dhdd d f<<d e<d d <d e <dd<ddddf<de <de ƒ<de <ƒe ƒZdZeidƒd„Zeieidƒd„Zeieidƒd„Zeidƒd„Zeidƒd „Zeieid!ƒed"„Zeid#ƒd$d%„Zeieid&ƒed'„Zeieid(ƒed)„Zeieid*ƒed+„Zei d,ƒd-„Z!eieid.ƒeeeeeed/„Z"RS(0su implements an image attribute. it stores it's data in an image sub-object sizes is an dictionary containing the sizes to scale the image to. PIL is required for that. Format: sizes={'mini': (50,50), 'normal' : (100,100), ... } syntax: {'name': (width,height), ... } the scaled versions can then be accessed as object/_ e.g. object/image_mini where is the fieldname and is the name from the dictionary original_size -- this parameter gives the size in (w,h) to which the original image will be scaled. If it's None, then no scaling will take place. This is important if you don't want to store megabytes of imagedata if you only need a max. of 100x100 ;-) max_size -- similar to max_size but if it's given then the image is checked to be no bigger than any of the given values of width or height. XXX: I think it is, because the one who added it did not document it ;-) (mrtopf - 2003/07/20) example: ImageField('image', original_size=(600,600), sizes={ 'mini' : (80,80), 'normal' : (200,200), 'big' : (300,300), 'maxi' : (500,500)}) will create an attribute called "image" with the sizes mini, normal, big, maxi as given and a original sized image of max 600x600. This will be accessible as object/image and the sizes as object/image_mini object/image_normal object/image_big object/image_maxi the official API to get tag (in a pagetemplate) is obj.getField('image').tag(obj, scale='mini') ... sizes may be the name of a method in the instance or a callable which returns a dict. Don't remove scales once they exist! Instead of removing a scale from the list of sizes you should set the size to (0,0). Thus removeScales method is able to find the scales to delete the data. Scaling will only be available if PIL is installed! If 'DELETE_IMAGE' will be given as value, then all the images will be deleted (None is understood as no-op) stypesimagesdefaultss original_sizesmax_sizessizessthumbiPsswallowResizeExceptionss pil_qualityiXspil_resize_algosdefault_content_types image/pngsallowable_content_typess image/gifs image/jpegswidgetsstorages content_classsviewssetc KsP| odSn|djo+|i||ti|||dSn|idtƒ|i |ƒ}|i |d|d||\}}}t|dtƒ}|djodSn||d<||ds.   . # screateOriginalcKsI|o|i|||}n|i|ƒ}ti||||dS(s,create the original image (save it) N( svaluesselfs _wrapValuesinstanceskwargssimages getDefaults ObjectFieldsset(sselfsinstancesvalueskwargssimage((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyscreateOriginalbs s removeScalescKs…|i|ƒ}|okxh|iƒD]V\}}|iƒd|}y |i |ƒi |||Wq#t j oq#Xq#WndS(s Remove the scaled image s_N( sselfsgetAvailableSizessinstancessizessitemssnamessizesgetNamesids getStoragesunsetskwargssKeyError(sselfsinstanceskwargssnamessizessidssize((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys removeScalesms  s createScalesc CsÁ|i|ƒ} t p| odSn|tjo2|i|ƒ}| odSnt |i ƒ} n|} | odSn|i |ƒ}x/| i ƒD]!\} }|ddfjoq˜n|\}}|iƒd| }|||||f} y|i| ||ƒ\}}Wn8tj o ‚n$|i o‚qMtƒq˜nXd|iƒ} |i||iƒ|| ƒ}||_ t|dƒ|i |ƒi!|||d| d|ƒq˜WdS(s)creates the scales and save them Nis_simage/%sstitlesmimetypesfilename("sselfsgetAvailableSizessinstancessizessHAS_PILsvalues_markersgetRawsimgsstrsdatas getFilenamesfilenamesitemssnssizeswshsgetNamesids__traceback_info__sscalesimgdatasformats ConflictErrorsswallowResizeExceptionsslog_excslowersmimetypes content_classsimagesdelattrs getStoragesset(sselfsinstancesvaluesimagesidssizesimgsfilenamesformats__traceback_info__sdatasmimetypessizessnswshsimgdata((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys createScales€sJ       sscalesPNGc Cst|ƒt|ƒf} t|ƒ}tii |ƒ} | i }|djo| i dƒ} n!|djo| i dƒ} n| i| |iƒ| io| ip|}|djo |djo| i dƒ} ntƒ}| i||d|iƒ|idƒ||iƒfSdS( s1 scale image (with material from ImageTag_Hotfix)s1sLsPsRGBAsGIFsqualityiN(sintswshssizesStringIOsdatas original_filesPILsImagesopensimagesmodes original_modesconverts thumbnailsselfspil_resize_algosformatsdefault_formatsthumbnail_filessaves pil_qualitysseekslower( sselfsdataswshsdefault_formatsthumbnail_filesformats original_modes original_filesimagessize((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysscale¶s"      sgetSizecCs?|i|d|ƒ}| oddfSn|i|ifSdS(s&get size of scale or original sscaleiN(sselfsgetScalesinstancesscalesimgswidthsheight(sselfsinstancesscalesimg((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetSize×s sgetScalecKs|tjo|i||SnÜ||i|ƒiƒjd||iƒffpt ‚|i d|ƒ}y"|i |ƒi|||}Wntj o dSnX|i|||}t|ddtƒo|idtƒ o|i|ƒSn|SdS(s&Get scale by name or original sUnknown scale %s for %ssscaless__of__sacquires unwrappedN(sscalesNonesselfsgetsinstanceskwargssgetAvailableSizesskeyssgetNamesAssertionErrors getScaleNamesids getStoragesimagesAttributeErrors _wrapValuesshasattrsTruesFalses__of__(sselfsinstancesscaleskwargssimagesid((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetScaleàs 9" *s getScaleNamecCs%|o|iƒd|SndSdS(s9Get the full name of the attribute for the scale s_sN(sscalesselfsgetName(sselfsscale((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys getScaleNameôssget_sizecCsÇ|i|ƒ}|i|ƒ}|o |iƒpd}|o€x}|iƒD]k}|i d|ƒ}y|i |ƒi||ƒ}Wntj oqLX||o |iƒpd7}qLWn|SdS(sGet size of the stored data used for get_size in BaseObject XXX: We should only return the size of the original image isscaleN(sselfsgetAvailableSizessinstancessizessgetsoriginalsget_sizessizeskeyssnames getScaleNamesids getStoragesdatasAttributeError(sselfsinstancesnamessizessidsdatasoriginalssize((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysget_sizeýs &stagcKs{|i|d|ƒ}|o|i} |i} n d} d} |t jo | }n|t jo | }n|i ƒ} |o| d|i |ƒ7} n| d|i ƒ7} hd| <d|o|p |iƒ<d|o|p |iƒ<d|<d|<} d | }|t j od ||f}nx8|iƒD]*\}} | od ||| f}qAqAWd |Sd S(s%Create a tag including scale sscaleis/ssrcsaltstitlesheightswidthsX%(alt)sN(sselfsgetScalesinstancesscalesimagesheights img_heightswidths img_widthsNones absolute_urlsurls getScaleNamesgetNamesaltsTitlestitlesvaluessresults css_classskwargssitemsskeysvalue(sselfsinstancesscalesheightswidthsalts css_classstitleskwargssurls img_widthsvalues img_heightsvaluessresultskeysimage((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pystag s0       [   (#s__name__s __module__s__doc__s FileFields _propertiesscopysupdatesNonesFalsesPIL_ALGOs ImageWidgetsAttributeStoragesImagesClassSecurityInfossecuritys default_viewsdeclarePrivatessetsdeclareProtectedsCMFCorePermissionssViewsgetAvailableSizessModifyPortalContentsrescaleOriginalscreateOriginals removeScaless_markers createScalessscalesgetSizesgetScales getScaleNames declarePublicsget_sizestag(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys ImageField„s: F   >  #    5       sDynVariantWrappercBstZdZd„ZRS(spProvide a transparent wrapper from image to dynvariant call it with url ${image_url}/variant/${variant} cCs|iƒSdS(N(sparentsVariants(sselfsparent((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys__of__C s(s__name__s __module__s__doc__s__of__(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysDynVariantWrapper> s s DynVariantcBs tZdZd„Zd„ZRS(sProvide access to the variants.cCsdS(N((sself((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys__init__I scCs>|i|ƒo |i|ƒit|ƒƒSn t|ƒSdS(N(sselfscheckForVariantsnamesgetPhotos__of__s aq_parent(sselfsname((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys __getitem__L s (s__name__s __module__s__doc__s__init__s __getitem__(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys DynVariantF s  s ScalableImagec BsNtZdZeiZdZd„ZeƒZddhd„Z e ƒZ ei e idƒd„Zei e idƒd„Zei e id ƒd „Zeid ƒd „Zei e id ƒed„Zei e idƒeeeeeeeedd„ Zeidƒeed„Zdd„Zei edƒed„ZRS(sA scalable image class.sScalable ImagecCstS(N(sTrue(sself((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysY sscCs/ti||||ƒtƒ|_||_dS(N( s BaseImages__init__sselfsidstitlesfilesOOBTrees_photossdisplays(sselfsidstitlesfilesdisplays((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys__init__] s sVariantscCstƒi|ƒSdS(N(s DynVariants__of__sself(sself((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysVariantsf ssgetPhotocCs|i|SdS(s'returns the Photo of the specified sizeN(sselfs_photosssize(sselfssize((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysgetPhotok ss getDisplaysc Cs{g}xZ|iiƒD]I\}}|ihd|<dd||d|df<d|<ƒqW|id„ƒ|SdS(Nsnameslabels %s (%dx%d)iissizecCs5t|dd|dd|dd|ddƒS(Nssizeii(scmpsd1sd2(sd1sd2((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysx s(sresultsselfsdisplayssitemssnamessizesappendssort(sselfssizesresultsname((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys getDisplaysp s  AscheckForVariantcCsÎ||iiƒjo°|ii|ƒ o;t|||i|ii|ddfƒƒƒ|i|N(&sselfswidthswsheightshsNonessizesdisplaysskeyss_photosshas_keysgetsxsysintsroundsfloats ValueErrorsphotosxscalesscalesxdeltasyscalesydeltasstrs absolute_urlsescapesresultsaltsgetattrstitlesappends_[1]sargsslowers css_classskeysvalue(sselfsheightswidthsaltsscalesxscalesyscales css_classstitlessizesargssphotosresultsxdeltaskeysydeltasvalues_[1]swshsysx((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pystag™ sb  ..     &&  ;  s update_datacCs&ti||||ƒtƒ|_dS(s> Update/upload image -> remove all copies N(s BaseImages update_datasselfsdatas content_typessizesOOBTrees_photos(sselfsdatas content_typessize((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys update_dataç sidcCsœtƒ}|\}}yHtoWtiitt |i ƒƒƒ}|i } |i||fƒ|i|| d|ƒnçtidjo6dkl}|d|||fdfƒ\} }n9dkl} | d|||fƒ} | i}| i} | it |i ƒƒ| iƒ|i|iƒƒ|iƒtidjo| iƒn|i dƒWn4t!j o ‚n t"j o} t$dƒnX|Sd S( sResize and resample photo.squalityswin32(spopen2s'convert -quality %s -geometry %sx%s - -sb(sPopen3isError while resizing imageN(%sStringIOsimagessizeswidthsheightsHAS_PILsPILsImagesopensstrsselfsdatasimgsformatsfmts thumbnailssavesqualityssyssplatforms win32pipespopen2simginsimgoutsPopen3sconverts fromchildstochildswritesclosesreadswaitsseeks ConflictErrors Exceptionseslog_exc(sselfssizesqualitysimagespopen2sheightsimgsimgoutswidthsimginsconvertsesPopen3sfmt((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys_resizeî s8  !  )     sZCacheable_setManagerIdcCsbx<|iiƒD]+}|i|ƒi|ƒ}|i|ƒqWt i dƒ}||||ƒSdS(srChanges the manager_id for this object. overridden because we must propagate the change to all variantssZCacheable_setManagerIdN( sselfs_photosskeysssizesgetPhotos__of__svariantsZCacheable_setManagerIds manager_idsPhotosinheritedAttributesinherited_attrsREQUEST(sselfs manager_idsREQUESTsvariantsinherited_attrssize((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysZCacheable_setManagerId s(s__name__s __module__s__doc__s BaseImages__implements__s meta_typesisBinarysClassSecurityInfossecuritys__init__sDynVariantWrappersvariantsdeclareProtectedsCMFCorePermissionssViewsVariantssgetPhotos getDisplayssdeclarePrivatescheckForVariantsNones index_htmlsFalsestags update_datas_resizesChangeCacheSettingsPermissionsZCacheable_setManagerId(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys ScalableImageR s2           $M  / s PhotoFieldc BstZdZeiiƒZeihdd<dd<dd<dddf<d hd d d f<d d d f<dddf<dddf<dddf<dddf<<de<deƒ<ƒe ƒZ dZ e i dƒd„Z e i dƒd„ZRS(sA photo field class.stypesimagesdefaultssdefault_content_types image/gifsallowable_content_typess image/jpegsdisplayss thumbnaili€sxsmalliÈssmalli@smediumiàslargeisxlargeiswidgetsstoragesviewssetcKs^t|ƒtjot|ƒ}nt|iƒd|d|iƒ}t i ||||dS(Nsfilesdisplays( stypesvalues StringTypesStringIOs ScalableImagesselfsgetNamesdisplayssimages ObjectFieldssetsinstanceskw(sselfsinstancesvalueskwsimage((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pyssetE s svalidate_requiredcs5tˆd‡d†ƒƒ‰ti||ˆ|ƒSdS(Nsget_sizecs tˆƒS(N(sstrsvalue((svalue(s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysN s(sgetattrsvalues ObjectFieldsvalidate_requiredsselfsinstanceserrors(sselfsinstancesvalueserrors((svalues?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pysvalidate_requiredM s(s__name__s __module__s__doc__sFields _propertiesscopysupdates ImageWidgetsAttributeStoragesClassSecurityInfossecuritys default_viewsdeclarePrivatessetsvalidate_required(((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys PhotoField+ s ¯    stitlesStrings descriptionsUsed for storing simple stringssFilesUsed for storing filessTexts:Used for storing text which can be used in transformationss Date TimesUsed for storing date/timesIntegersUsed for storing integer valuessFloatsUsed for storing float valuess Fixed Points#Used for storing fixed point valuess References7Used for storing references to other Archetypes ObjectssComputedsARead-only field, which value is computed from a python expressionsBooleansUsed for storing boolean valuess CMF ObjectszUsed for storing value inside a CMF Object, which can have workflow. Can only be used for BaseFolder-based content objectssRUsed for storing images. Images can then be retrieved in different thumbnail sizessPhotos,Used for storing images. Based on CMFPhoto. srequiredsbooleansdefaultsstringsintegersdatetimes vocabularysenforceVocabularys multiValueds searchables isMetadatasaccessors edit_accessorsmutatorsmodesread_permissionswrite_permissionswidgets validatorssstoragesindexsold_field_name(s __future__s nested_scopesssysscopysdeepcopyscgisescapes cStringIOsStringIOstypessListTypes TupleTypes ClassTypesFileTypesDictTypesIntTypes StringTypes UnicodeTypes StringTypess AccessControlsClassSecurityInfosgetSecurityManagers Acquisitionsaq_bases aq_parentsaq_innersImplicitsBTrees.OOBTreesOOBTreesComputedAttributesDateTimesExtensionClasssBasesGlobalssInitializeClasssOFS.content_typessguess_content_types OFS.ImagesFilesPdatasImages BaseImagesOFS.Traversables Traversables OFS.CachesChangeCacheSettingsPermissionsZPublisher.HTTPRequests FileUploadsZODB.POSExceptions ConflictErrorsProducts.CMFCore.utilss getToolByNames_getAuthenticatedUsersProducts.CMFCoresCMFCorePermissionssProducts.Archetypes.configsREFERENCE_CATALOGsProducts.Archetypes.LayersDefaultLayerContainers&Products.Archetypes.interfaces.storagesIStorages#Products.Archetypes.interfaces.bases IBaseUnits$Products.Archetypes.interfaces.fieldsIFields IObjectFields IFileFields$Products.Archetypes.interfaces.layersILayerContainers)Products.Archetypes.interfaces.vocabularys IVocabularysProducts.Archetypes.exceptionssObjectFieldExceptionsTextFieldExceptionsFileFieldExceptionsReferenceExceptionsProducts.Archetypes.Widgets BooleanWidgetsCalendarWidgetsComputedWidgets DecimalWidgets FileWidgets ImageWidgets IntegerWidgets LinesWidgets StringWidgetsReferenceWidgetsProducts.Archetypes.BaseUnitsBaseUnits#Products.Archetypes.ReferenceEngines ReferencesProducts.Archetypes.utilss DisplayLists Vocabularys classNamesmapplysshasattrscontentDispositionHeadersProducts.Archetypes.debugsERRORslogslog_excsProducts.ArchetypessconfigsProducts.Archetypes.StoragesAttributeStoragesObjectManagedStoragesReadOnlyStoragesProducts.Archetypes.Registrys setSecuritys registerFieldsregisterPropertyTypesProducts.validationsValidationChainsUnknowValidatorErrorsFalseValidatorErrors)Products.validation.interfaces.IValidators IValidatorsIValidationChainsProducts.generatorsi18ns PIL.ImagesPILs ImportErrorsFalsesHAS_PILsNonesPIL_ALGOsTrues ANTIALIASs STRING_TYPESs_markersCHUNKs __docformat__sencodesdecodes _field_countsFields ObjectFields StringFields FileFields TextFields DateTimeFields LinesFields IntegerFields FloatFieldsFixedPointFieldsReferenceFields ComputedFields BooleanFieldsCMFObjectFields ImageFieldsDynVariantWrappers DynVariants ScalableImages PhotoFields__all__(qsDateTimes IObjectFields TextFieldsCMFObjectFieldsPILsUnknowValidatorErrorsReferenceWidgetsBasesImplicitslog_excsregisterPropertyTypes IntegerFieldsListTypes IntegerWidgets FileWidgets DynVariants References BooleanFieldsCMFCorePermissionss_getAuthenticatedUsersgetSecurityManagers IBaseUnitsBaseUnitsDefaultLayerContainers_markers PhotoFieldsescapes ComputedFields StringTypes__all__sReferenceExceptions BooleanWidgets ImageWidgets StringTypess StringFieldsaq_innerscontentDispositionHeaders DecimalWidgetsPdatas DateTimeFieldsERRORsObjectManagedStoragesChangeCacheSettingsPermissionsStringIOsHAS_PILsImagesshasattrs LinesWidgets IFileFieldsFixedPointFieldsIStoragesDynVariantWrappersObjectFieldExceptions registerFields __docformat__s ConflictErrors aq_parentsFileFieldExceptionsOOBTreeslogs VocabularysCHUNKsComputedWidgetsdecodesValidationChainsencodes IVocabularysAttributeStorages FileUploadsaq_bases nested_scopessIValidationChainsTextFieldExceptions STRING_TYPESs ScalableImages Traversablesi18ns TupleTypesCalendarWidgetsReadOnlyStorages ClassTypesguess_content_types classNames UnicodeTypes IValidatorsDictTypesIntTypesILayerContainers FloatFieldsFieldsmapplys getToolByNamesdeepcopys ImageFields StringWidgetsREFERENCE_CATALOGsIFieldsPIL_ALGOsconfigs LinesFieldsComputedAttributes DisplayListsFileTypesClassSecurityInfosInitializeClasssFalseValidatorErrorssyss BaseImages ObjectFields setSecuritys FileFieldsFilesReferenceField((s?/mnt/gmirror/ports/www/zope-archetypes/work/Archetypes/Field.pys?sj     +                                                                          ÿß Š ÿ3¶4#"Iÿ Rÿ» × &6