;ò î4fCc@sdklZdklZdkZdklZdklZdeefd„ƒYZ defd„ƒYZ d fd „ƒYZ d efd „ƒYZ d efd„ƒYZ defd„ƒYZdefd„ƒYZdefd„ƒYZde fd„ƒYZdS((sTag(sTemplateHandlerN(sStringIO(slogsTemplatecBs,tZdZd„Zdd„Zd„ZRS(NsactioncCs |i|i|i|ƒƒSdS(N(sreqsgetInputsselfs FIELD_NAMEsgetDefaultTemplate(sselfsreq((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys getTemplate!sscCs|i|iƒƒSdS(N(sselfsparseshandlersreq(sselfshandlerscdata((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys__call__$scCs3|iidƒ}| od|i‚n|SdS(Nsdefaults2please set tag attribute default or override me %s(sselfsattrssgetsdefaultsgetDefaultTemplate(sselfsreqsdefault((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysgetDefaultTemplate(s(s__name__s __module__s FIELD_NAMEs getTemplates__call__sgetDefaultTemplate(((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysTemplates  sExeccBstZdd„ZRS(NscBsb| odSnei}z4eƒe_|dUeiiƒ}eiiƒWd|e_X|SdS(Ns( scdatassyssstdoutsoldoutsStringIOsgetvaluesretvalsclosessdtout(sselfshandlerscdatasoldoutsretval((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys__call__0s   (s__name__s __module__s__call__(((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysExec/ss DataMixincBsVtZeZd„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z RS( NcCs |iSdS(N(sselfsKEY(sselfshandler((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysgetKey@scCs|iƒi|ƒSdS(N(shandlersreqsgetInputskey(sselfshandlerskey((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysgetRecIdBscCsdS(N((sselfshandlerskey((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys getRecordEscCs‹|i||i|ƒƒ}|oe|i|f}|iƒi|ƒ}| o1|i ||ƒ}|o||iƒ|%sscCs8|iid|iƒ}|i|ƒi|ƒ}|SdS(Nsname(sselfsattrssgetsNAMEsfieldsrecordshandlersvalue(sselfshandlersfieldsvalue((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysgetValuejscCs;|iƒ}|iid|iƒ}|i|ƒ}|SdS(Ns delimiter( svaluesstripsselfsattrssgets DELIMITERs delimiterssplitslist(sselfsvalueslists delimiter((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysgetListos csDy2dit‡d†ˆiˆi|ƒƒƒƒSWn dSnXdS(Nscs ˆi|S(N(sselfsLIsx(sx(sself(s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysws(sjoinsmapsselfsgetListsgetValueshandler(sselfshandlerscdata((sselfs6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys__call__us2(s__name__s __module__s DELIMITERsLIsNAMEsgetValuesgetLists__call__(((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysOutLinees   s ConditioncBstZd„Zdd„ZRS(NcCsdSdS(Ni((sselfshandler((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pystoShow|sscCs |i|ƒo|SndSdS(Ns(sselfstoShowshandlerscdata(sselfshandlerscdata((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys__call__s(s__name__s __module__stoShows__call__(((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys Condition{s sLabelcBstZd„ZRS(NcCs3|iidƒ}|o|i|ƒi|ƒSdS(Nsfield(sselfsattrssgetsfieldsrecordshandler(sselfshandlersfield((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pystoShow†s(s__name__s __module__stoShow(((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysLabel…ssListcBs†tZdZdZdZdZdZfZd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„ZRS(Nspagesizeslinei s%ssNAcCs)|i|ƒ}|id|d|ƒSdS(NslinespageSize(sselfs selectionshandlerscursorsfetchslinespageSize(sselfshandlerslinespageSizescursor((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysfetch•scCsH|i|ƒ}d}x(|D] }|||i||ƒ7}qW|SdS(Ns(sselfsgetRowsshandlersrecordsshtmlsrecordscdatas prepareRow(sselfshandlerscdatasrecordshtmlsrecords((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys__call__šs cCs;t|iƒi|i|iƒi|i|iƒƒƒSdS(N( sintshandlersreqsgetInputsselfs PAGEsIZEkEYsgetAttrssgetsPAGEsIZE(sselfshandler((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys getPageSize¡scCs8t|iƒi|i|iƒi|idƒƒƒSdS(Ns1(sintshandlersreqsgetInputsselfsLINEkEYsgetAttrssget(sselfshandler((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysgetLine¤scCs/|i|d|i|ƒd|i|ƒƒSdS(NslinespageSize(sselfsfetchshandlersgetLines getPageSize(sselfshandler((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysgetRows§scCs:x/|iD]$}||jo|i|||iƒi|ƒ}| o|ii||ƒ}n|SdS(N( shandlersreqsgetInputsqs_keysvaluesselfsattrssgetskeysdefault(sselfshandlersqs_keyskeysdefaultsvalue((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysgetFieldîscCs@|i||i|i|iƒ}tot|i tƒSndS(N( sselfsgetFieldshandlers QS_TABLENAMEs TABLENAMEsTABLEs tabelnames tablenamesgetattrs DATAMODEL(sselfshandlers tabelname((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysgetTableõs!cCs#|i||i|i|iƒSdS(N(sselfsgetFieldshandlers QS_KEYNAMEsKEYNAMEsKEY(sselfshandler((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysgetKeyûscCs#|i|ƒ}ti||ƒSdS(N(sselfsgetTableshandlerstables datamodelsgetskey(sselfshandlerskeystable((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys getRecordþscCstiti|ƒ}|SdS(N(s datamodelsselects ContractorsselectCriteriascursor(sselfshandlersselectCriteriascursor((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys getSelections(s__name__s __module__sNones DATAMODELsTABLEs TABLENAMEs QS_TABLENAMEsKEYNAMEs QS_KEYNAMEsKEYsgetFieldsgetTablesgetKeys getRecords getSelection(((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pysDbMixinâs    (sparsersTagshandlerssTemplateHandlerssyss cStringIOsStringIOsutilslogsTemplatesExecs DataMixinsOutLines ConditionsLabelsLists TwoColumnListsDbMixin(s DataMixinslogsStringIOsExecsListsDbMixinsLabelssyssTagsTemplatesTemplateHandlers TwoColumnLists ConditionsOutLine((s6/home/groups/p/ps/pso/htdocs/tutorial/Edit/pso/tags.pys?s     ( A