{ "info": { "author": "Souheil Chelfouh", "author_email": "trollfot@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Other Audience", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "*****************************\nmenhir.contenttype.photoalbum\n*****************************\n\n``menhir.contenttype.photoalbum`` provides a single content type\nuseable to display images as a collection. The content type has two\ndifferent rendering views, allowing to render the images as static\nthumbnails or as an animated gallery.\n\nInterfaces\n==========\n\nThe ``menhir.contenttype.photoalbum`` `IPhotoAlbum` interface extends\n`IDescriptiveSchema` from ``dolmen.app.content`` and `IContainer` from\n``zope.container``::\n\n >>> from zope.container.interfaces import IContainer\n >>> from dolmen.app.content import IDescriptiveSchema\n >>> from menhir.contenttype.photoalbum import IPhotoAlbum\n\n >>> IPhotoAlbum.isOrExtends(IContainer)\n True\n\n >>> IPhotoAlbum.isOrExtends(IDescriptiveSchema)\n True\n\nThis interface is applied as a schema for the `PhotoAlbum`::\n\n >>> from dolmen.content import schema\n >>> from menhir.contenttype.photoalbum import PhotoAlbum\n >>> schema.bind().get(PhotoAlbum)\n []\n\nThe `IPhotoAlbum` interface defines a containership constraint,\nallowing only `IImage` contents, from ``menhir.contenttype.image``::\n\n >>> album = PhotoAlbum(title=u\"My nice images\")\n\n >>> from zope.container.constraints import checkObject\n >>> checkObject(album, 'temporary', object())\n Traceback (most recent call last):\n ...\n InvalidItemType: (,\n , (,))\n\nA `PhotoAlbum` object provides the `IPhotoAlbum` interface but also\nthe `IViewSelector` interface, defining the name of the view used to\nrender the object::\n\n >>> IPhotoAlbum.providedBy(album)\n True\n\n >>> from dolmen.app.viewselector import IViewSelector\n >>> IViewSelector.providedBy(album)\n True\n\n\nFactory\n=======\n\nThe factory is protected by a common ``dolmen.app.security`` right::\n\n >>> from dolmen.content import require\n >>> print require.bind().get(album)\n dolmen.content.Add\n\n\nIcon\n====\n\nThe content registers an icon, thanks to the ``dolmen.app.content``\npackage::\n\n >>> from zope.component import getMultiAdapter\n >>> from zope.publisher.browser import TestRequest\n\n >>> request = TestRequest()\n >>> icon = getMultiAdapter((album, request), name=\"icon\")\n >>> print icon\n \n\n\nPopulation\n==========\n\n >>> import os.path\n >>> from menhir.contenttype.image import Image\n\n >>> testpath = os.path.join(os.path.dirname(__file__), 'tests')\n >>> path1 = os.path.join(testpath, 'dolmen.png')\n >>> path2 = os.path.join(testpath, 'dolmen-test-site.png')\n\n >>> imagefile = open(path1)\n >>> image1 = Image(title=u\"Logo\", image=imagefile)\n >>> imagefile.close()\n\n >>> imagefile = open(path2)\n >>> image2 = Image(title=u\"Example\", image=imagefile)\n >>> imagefile.close()\n\n >>> from zope.component.hooks import getSite\n >>> site = getSite()\n >>> site['album'] = album\n >>> site['album']['dolmen_logo'] = image1\n >>> site['album']['dolmen_site_example'] = image2\n\n\nViews\n=====\n\nThumbnails view\n---------------\n\n >>> print album.selected_view\t\n thumbnails_view\n\n >>> import fanstatic\n >>> fanstatic.init_needed()\n \n\n >>> index = getMultiAdapter((album, request), name=\"index\")\n\n >>> index.update()\n >>> print index.content()\n

My nice images

\n
\n
\n \n
\n
\n\n >>> fanstatic.get_needed().resources()\n [,\n ,\n ,\n ,\n ]\n\n\nAnimated view\n-------------\n\n >>> album.selected_view = \"gallery_view\"\n \n >>> fanstatic.init_needed()\n \n\n >>> index = getMultiAdapter((album, request), name=\"index\")\n\n >>> index.update()\n >>> print index.content()\n

My nice images

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n >>> fanstatic.get_needed().resources()\n [,\n ,\n ,\n ]\n\n\nChangelog\n=========\n\n0.4 (2011-02-14)\n----------------\n\n* The schema now inherits from `IDescriptiveSchema` from\n ``dolmen.app.content`` and no longer from `IBaseContent` from\n ``dolmen.content``. This adds a `description` attribute along with\n the already existing `title`.\n\n\n0.3 (2011-02-02)\n----------------\n\n* Fixed the animated gallery page for Galleriffic 2.0.1-1.\n\n\n0.2 (2011-02-02)\n----------------\n\n* Added missing resources entry point.\n\n* Updated for Grok 1.3.\n\n\n0.1 (2011-01-19)\n----------------\n\n* Initial release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.dolmen-project.org", "keywords": "Grok Zope3 CMS Dolmen", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "menhir.contenttype.photoalbum", "package_url": "https://pypi.org/project/menhir.contenttype.photoalbum/", "platform": "Any", "project_url": "https://pypi.org/project/menhir.contenttype.photoalbum/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.dolmen-project.org" }, "release_url": "https://pypi.org/project/menhir.contenttype.photoalbum/0.4/", "requires_dist": null, "requires_python": null, "summary": "Dolmen contenttype extension : photoalbum", "version": "0.4" }, "last_serial": 794697, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "9b2d591869d3912089f58a7259cd0721", "sha256": "460bf7559c1701943fa4b388ca7abaf3b82227360d9859a224bdac728b67c463" }, "downloads": -1, "filename": "menhir.contenttype.photoalbum-0.1.tar.gz", "has_sig": false, "md5_digest": "9b2d591869d3912089f58a7259cd0721", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 223884, "upload_time": "2011-01-19T19:15:40", "url": "https://files.pythonhosted.org/packages/51/13/f1e7e95757c3046220b3c205cbb5d7b298156ea6475557cd99ab7c45f1db/menhir.contenttype.photoalbum-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "d781b652134b2a712918ab0ad23a17f7", "sha256": "39fda64ceb58551e6327ca3d9a2d231596de29d37ea8a4244095bbe511fbf683" }, "downloads": -1, "filename": "menhir.contenttype.photoalbum-0.2.tar.gz", "has_sig": false, "md5_digest": "d781b652134b2a712918ab0ad23a17f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 224133, "upload_time": "2011-02-02T13:58:27", "url": "https://files.pythonhosted.org/packages/5b/2f/dc8bab6c4423413e3a104710f0471de5fed5fb59b0a3f5d72c9039b5fd19/menhir.contenttype.photoalbum-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "71276388d62765da4caccb3325a94f93", "sha256": "dbe641b34bab50f47c4a67fdad12cec43aaa2708b5bc566e8bd8bbfecd24ed14" }, "downloads": -1, "filename": "menhir.contenttype.photoalbum-0.3.tar.gz", "has_sig": false, "md5_digest": "71276388d62765da4caccb3325a94f93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 224126, "upload_time": "2011-02-02T19:00:25", "url": "https://files.pythonhosted.org/packages/7e/cf/ceebd011c3b3aa4df68721b5bcae565f33aa8a7e3bcdcca86e87389d9be1/menhir.contenttype.photoalbum-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "9bad13dbd5f1000121da52c37747a61f", "sha256": "df2350791b18d475c9eb2b38c63168b53065ffa0fff960ec059628762f7a7dd8" }, "downloads": -1, "filename": "menhir.contenttype.photoalbum-0.4.tar.gz", "has_sig": false, "md5_digest": "9bad13dbd5f1000121da52c37747a61f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 224502, "upload_time": "2011-02-14T17:23:39", "url": "https://files.pythonhosted.org/packages/f2/28/7b29156775208079616828b122c3a598581a64f961ebfcf307f1b4344a81/menhir.contenttype.photoalbum-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9bad13dbd5f1000121da52c37747a61f", "sha256": "df2350791b18d475c9eb2b38c63168b53065ffa0fff960ec059628762f7a7dd8" }, "downloads": -1, "filename": "menhir.contenttype.photoalbum-0.4.tar.gz", "has_sig": false, "md5_digest": "9bad13dbd5f1000121da52c37747a61f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 224502, "upload_time": "2011-02-14T17:23:39", "url": "https://files.pythonhosted.org/packages/f2/28/7b29156775208079616828b122c3a598581a64f961ebfcf307f1b4344a81/menhir.contenttype.photoalbum-0.4.tar.gz" } ] }