{ "info": { "author": "Souheil Chelfouh", "author_email": "trollfot@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "***********************\nmenhir.contenttype.file\n***********************\n\n``menhir.contenttype.file`` provides a content type for `Dolmen` based\n`Grok` applications.\n\n\nSchema\n======\n\nThe ``menhir.contenttype.file`` provides a very simple schema,\nextending the `IDescriptiveSchema` interface, from ``dolmen.app.content``::\n\n >>> from dolmen.app.content import IDescriptiveSchema\n >>> from menhir.contenttype.file import IFile\n\n >>> IFile.isOrExtends(IDescriptiveSchema)\n True\n\nThe `IFile` interface describes the data field, that is to hold the\nuploaded file or given bytes::\n\n >>> for attr, doc in IFile.namesAndDescriptions():\n ... print attr, ':', doc\n data : \n\nThis `IFile` is directly provided by the `File` object, as defines it as\nits schema::\n\n >>> from menhir.contenttype.file import File\n >>> from dolmen.content import Content\n\n >>> somefile = File(title=u\"My nice file\", data=\"Some file data\")\n >>> IFile.providedBy(somefile)\n True\n\n >>> from dolmen.content import schema\n >>> IFile in schema.bind().get(somefile)\n True\n\n >>> somefile.title\n u'My nice file'\n\n\nStorage\n=======\n\nThe file uses a Blob storage for the data::\n\n >>> somefile.data\n \n\n >>> print somefile.data.data\n Some file data\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((somefile, request), name=\"icon\")\n >>> print icon\n \n\nChangelog\n=========\n\n0.3 (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.2 (2010-07-20)\n----------------\n\n* Corrected package archive MANIFEST, to include missing icon\n\n\n0.1 (2010-07-16)\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://pypi.python.org/pypi/menhir.contenttype.file", "keywords": "Grok Dolmen File Content", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "menhir.contenttype.file", "package_url": "https://pypi.org/project/menhir.contenttype.file/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/menhir.contenttype.file/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/menhir.contenttype.file" }, "release_url": "https://pypi.org/project/menhir.contenttype.file/0.3/", "requires_dist": null, "requires_python": null, "summary": "File content type for Grok and Dolmen applications.", "version": "0.3" }, "last_serial": 794694, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5f2991e3c61f5708f42c84590cf97e11", "sha256": "9b9be15f5909311eef8020e3e4effa281b03c571f256fa02798d8d54307b2814" }, "downloads": -1, "filename": "menhir.contenttype.file-0.1.tar.gz", "has_sig": false, "md5_digest": "5f2991e3c61f5708f42c84590cf97e11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4098, "upload_time": "2010-07-16T16:02:00", "url": "https://files.pythonhosted.org/packages/6b/4a/023fe11849e274c48440c353db2339b2a7a8e08bc6ad98f565b4ae32a0ba/menhir.contenttype.file-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "7c696e9542626c9f133235d76d10d607", "sha256": "4d1b478fc42b4c886edbce2781eae0be031c3f1e27456726be9fbc62ad009d35" }, "downloads": -1, "filename": "menhir.contenttype.file-0.2.tar.gz", "has_sig": false, "md5_digest": "7c696e9542626c9f133235d76d10d607", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4810, "upload_time": "2010-07-20T19:06:09", "url": "https://files.pythonhosted.org/packages/b4/93/3e27a7a76655757d096bfda347772ebff0e96fe87f56369aa91663e1f0f4/menhir.contenttype.file-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "d0e023b36acbd5cd170a2b16f6ee9de4", "sha256": "07969c898f56fe6582e2ab5c5c15585bd868a0ec413dbf9b4c0ddf00531ebfa3" }, "downloads": -1, "filename": "menhir.contenttype.file-0.3.tar.gz", "has_sig": false, "md5_digest": "d0e023b36acbd5cd170a2b16f6ee9de4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5101, "upload_time": "2011-02-14T17:11:11", "url": "https://files.pythonhosted.org/packages/32/c7/1f61e128b813f1e34c00ca580c091b52041e3556806ab2569ca839962630/menhir.contenttype.file-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d0e023b36acbd5cd170a2b16f6ee9de4", "sha256": "07969c898f56fe6582e2ab5c5c15585bd868a0ec413dbf9b4c0ddf00531ebfa3" }, "downloads": -1, "filename": "menhir.contenttype.file-0.3.tar.gz", "has_sig": false, "md5_digest": "d0e023b36acbd5cd170a2b16f6ee9de4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5101, "upload_time": "2011-02-14T17:11:11", "url": "https://files.pythonhosted.org/packages/32/c7/1f61e128b813f1e34c00ca580c091b52041e3556806ab2569ca839962630/menhir.contenttype.file-0.3.tar.gz" } ] }