{ "info": { "author": "BlueDynamics Alliance", "author_email": "dev@bluedynamics.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "A tile is a piece of web application, i.e. a form, a navigation, etc.\n\nSplitting your application in such small and logic application parts makes it\neasy to re-use this application, simplifies application ajaxification and\nthe use of same application parts in different manners.\n\nImports.:\n\n >>> from bda.bfg.tile import Tile\n >>> from bda.bfg.tile import TileRenderer\n >>> from bda.bfg.tile import registerTile\n >>> from bda.bfg.tile import tile\n \nWe need some dummies as model and request.:\n\n >>> class Model(object): pass\n >>> model = Model()\n >>> from repoze.bfg.request import DEFAULT_REQUEST_FACTORIES\n >>> request = DEFAULT_REQUEST_FACTORIES[None]['factory'](environ={})\n \nThe pure Tile itself. Normally you do not create this directly, this is done\ndue registration, see below.:\n\n >>> mytile = Tile('testdata/tile1.pt', None)\n >>> mytile(model, request)\n u'Tile One'\n\nRegister a tile using the prior template testtemplate. When no object is given,\nthe default tile is instanciated as above.:\n\n >>> registerTile('tileone', 'testdata/tile1.pt')\n\nRender the already registered tile.:\n\n >>> TileRenderer(model, request)('tileone')\n u'Tile One'\n\nNow the decorator - level=1 is needed for the doctest only to reduce the module\nlevel.:\n\n >>> @tile('tiletwo', 'testdata/tile2.pt', level=1)\n ... class Tile2(Tile):\n ... data = u'custom'\n >>> TileRenderer(model, request)('tiletwo')\n u'Tile Two: Tile One'\n\nYou can define an attribute which is responsible to render the tile instead of\ndefining a template. By default ``render`` is taken. With the keyword argument \n``attribute`` you can point to a different attribute.:\n \n >>> @tile('attrtile')\n ... class Tile2(Tile):\n ... def render(self):\n ... return u'

Rendered via attribute call

'\n >>> TileRenderer(model, request)('attrtile')\n u'

Rendered via attribute call

'\n \n >>> @tile('attrtile', attribute='foobar')\n ... class Tile2(Tile):\n ... def foobar(self):\n ... return u'

Rendered via attribute foobar call

'\n >>> TileRenderer(model, request)('attrtile')\n u'

Rendered via attribute foobar call

'", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://svn.bluedynamics.net/svn/internal/bda.tile", "keywords": "", "license": "GNU General Public Licence", "maintainer": null, "maintainer_email": null, "name": "bda.bfg.tile", "package_url": "https://pypi.org/project/bda.bfg.tile/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bda.bfg.tile/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://svn.bluedynamics.net/svn/internal/bda.tile" }, "release_url": "https://pypi.org/project/bda.bfg.tile/1.0/", "requires_dist": null, "requires_python": null, "summary": "Handle web application parts as tiles.", "version": "1.0" }, "last_serial": 786751, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "5781d18ce262042b5cf81f5f010c7f98", "sha256": "18ab1b358b7a40bda8820f0f0ae0e8d8d1bdaa92a63ebffc5f8f1010470e3ed8" }, "downloads": -1, "filename": "bda.bfg.tile-1.0.tar.gz", "has_sig": false, "md5_digest": "5781d18ce262042b5cf81f5f010c7f98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5015, "upload_time": "2009-09-10T17:02:04", "url": "https://files.pythonhosted.org/packages/a9/90/5fbb2f0d93a294201f80ba127450e3406749c22623df001f4bbbbcf0e0b8/bda.bfg.tile-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5781d18ce262042b5cf81f5f010c7f98", "sha256": "18ab1b358b7a40bda8820f0f0ae0e8d8d1bdaa92a63ebffc5f8f1010470e3ed8" }, "downloads": -1, "filename": "bda.bfg.tile-1.0.tar.gz", "has_sig": false, "md5_digest": "5781d18ce262042b5cf81f5f010c7f98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5015, "upload_time": "2009-09-10T17:02:04", "url": "https://files.pythonhosted.org/packages/a9/90/5fbb2f0d93a294201f80ba127450e3406749c22623df001f4bbbbcf0e0b8/bda.bfg.tile-1.0.tar.gz" } ] }