{
"info": {
"author": "Andrey Orlov",
"author_email": "dbdt@dreambot.ru",
"bugtrack_url": null,
"classifiers": [
"Environment :: Web Environment",
"Framework :: Zope3",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP"
],
"description": "Short description of ng.adapter\n===============================\n\nThis package has developed as the library of small adapters for the\ndifferent dark purposes.\n\nAdapter mtime\n-------------\n\nAdapter mtime intdends for getting object modification time. Object\nmodification time determine on the IPersistent level and this is an exactly\nin the most cases, but sometimes we need some of hooks to know object\nmodification time and adapter mtime helps us in this.\n\nAdapter mtime adapts IPersistent interface to IMTime interface. IMTime interface\nhas the following fields:\n \n mtime\n time of the last modification of object\n\n strftime(format)\n return time as format string, fromat see in man strftime\n\nAdapter path\n------------\n\nAdapter path intends for getting path from root object to current, Adapter can adopt\nany objects to IPath interface. Interface IPath provide followed fields:\n\n path\n Path from root to current object maked from attribute __name__ of object in between;\n\n titledpath\n Path from root to current object maked from titles object in between. Titles getting from\n adapter title (ITitle interface);\n\n\nAdapter title\n-------------\n\nAdapter title intends for getting object title (for any object). Adapter can adopt\nany objects to ITitle interface. Interface IPath provide followed fields:\n\n title\n Object title\n\nIf current object has not title property, property title of object, adopted\nti IZopeDublinCore return instead, If adopt to IZopeDublinCore is not possible,\nproperty __name__ or class name return instead.\n\nAdapter has been wrote in goot component style and it's posible to write adapter\nto ITitle for any specific cases.\n\n\nAdapter nsinterface\n-------------------\n \nAdapter nsinterface define nsinterface namespace to get possibility adopt current\nobject to any interfacr. Some syntax sample followed:: \n\n \n \n \n \nIt usefaul, basicaly, in debugging purpose.\n\nA few adapters to INameChooser\n------------------------------\n\nIf any of this adapters will be actvated to some container, object, created in this\ncontainer will be accept __name__ from ITitle adapter. To activate adapter interface one of marker interfaces\nare to set to container. There are three INameChooser adapter:\n\nNameChooser \n This adapter turn on by ng.adapter.interfaces.INameChooserAble. Adapter set __name__ from ITitle\n adapter without any changes.\n \nNameChooserSafe \n This adapter turn on by ng.adapter.interfaces.INameChooserSafeAble.\n Before set as __name__ adapter changing string accepted from ITitle to\n discard a few symbols not recommended in URL: '/', '?' and other.\n \nNameChooserSafeWithoutSpaces\n This adapter turn on by ng.adapter.interfaces.INameChooserSafeWithoutSpacesAble.\n Before set as __name__ adapter changing string accepted from ITitle to\n discard a few symbols not recommended in URL: '/', '?' and other. Adapter replace white-spaces\n by '_'symbol also.\n \n\nAdapter pager\n-------------\n\nAdapter allow make pagers by list adopted to IPagerSource. Adapter quicly \ndoing all evaluatiion needed to provede ready results as methods.\n\nProduct content adapters from components with interfaces IContainer, IOrderedContainer and\nResultSet (returned by zope.catalog). \n\n\u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u0434\u043e\u0432 IPager\n.....................\n\n setPagerParameters(revert=None, orphan=None,size=None)\n Set pager parameters:\n \n revert\n Show list reverted;\n \n orphan\n Maximum orphaned items;\n \n size \n One page chunk size;\n \n have_before\n True, if page before current exist;\n\n befores\n Key list from previos pages begins;\n \n beforeURLs\n URL list of previous pages;\n\n before\n Previous page;\n\n beforeURL = Field()\n URL of prefvious page;\n\n chunk\n Component list showed in current chunk (page);\n\n after\n Key of first item on next page;\n \n afterURL\n URL of next page;\n \n afters \n Key list of first items on followed pages;\n\n afterURLs\n URL list of nest pages;\n\n have_after\n True, if next page exist;\n\n len \n Common length of list;\n \nCode Sample::\n\n 0\">\n