{ "info": { "author": "Mjumbe Wawatu Ukweli", "author_email": "mjumbewu@kwawatu.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Utilities" ], "description": "====================\nDjango Model Blocks\n====================\n\nThe ``model_blocks`` app provides you with automatically generated, stylable\ngeneric Django model template partials. It fills a gap left by ``admin`` and\n``databrowse`` by providing filters and tags that allow your to painlessly\ncreate templates with the following properties:\n\n* Automatically generated read-only views\n* Can conform to whatever URL structure you want\n* Can be placed as blocks on to your existing templates\n* Integrate well with the rest of your project\n\nAdd this to the top of any template::\n\n {% load model_blocks %}\n\nAnd drop the filter anywhere you have a model instance (e.g., DetailViews)::\n\n {{ object|as_detail_block }}\n\nQuick Reference\n---------------\n\nInstalling\n~~~~~~~~~~\n\nYou can install the ``model_blocks`` app from PyPI::\n\n $ pip install django-model-blocks\n\nSettings\n~~~~~~~~\n\nModify your ``INSTALLED_APPS`` setting to include::\n\n ...\n model_blocks,\n ...\n\nBasic Usage\n~~~~~~~~~~~\n\nNear the top of any template you want to use model blocks, or in a base \ntemplate, include the following line::\n\n {% load model_blocks %}\n\nThen, where you want to drop a generic model template, use::\n\n {{ object|as_detail_block }}\n\nOr::\n\n {{ object_list|as_list_block }}\n\n(**NOTE:** If your list has many objects, consider using pagination, as the list \nmay require a long time to render.)\n\nBy default, the title on an object detail block will be the unicode\nrepresentation of the object, and the title on a list will be the name of the\nmodel appended with `' List'`. To change the title, pass in a parameter::\n\n {{ object|as_detail_block:\"My Special Object\" }}\n\nAdvanced Usage\n~~~~~~~~~~~~~~\n\nWhile using the filters remains the original and most simple way to render\nthe blocks, if you want/need greater control over the specifics of how certain\nmodels render, you can use the tag notation::\n\n {% detail_block object %}\n\n {% list_block object_list %}\n\nYou can still override the title by using ``with``::\n\n {% with title=\"My Special Object\" %}\n {% detail_block object %}\n {% endwith %}\n\nYeah, if all you need to do is override the title, then stick with the filters. \nHowever, When you drop a detail block into your template, it will automatically \nrender all of the referenced object's fields, including related model fields. \nThis potentially results in a tree of objects in your page. The tag notation's \nstrength is revealed when you need to use a custom template for any model in \nyour tree.\n\nThe ``example_project`` in the source includes a demonstration of this feature.\nIn that example, there are ``Pepulator`` objects, and each one may have several \n``Knuckle`` objects and several ``Jamb`` objects. However, each ``Knuckle`` has \na field referring to the URL of an image. On our ``Pepulator`` detail page, we \nwant all of our ``Kuckle`` objects and ``Jamb`` objects shown. The default \ntemplate is sufficient for ``Jamb`` objects, but we have to provide a custom \ntemplate (based on the default) for each ``Knuckle``. So, we render the \n``Pepulator`` detail like so::\n\n {% with pepulator_factory_knuckle_detail_template=\"pepulator_factory/knuckle_detail.html\" %}\n {% detail_block pepulator %}\n {% endwith %}\n\nVoila! For more information, check out the \n`pepulator_detail.html `_ \nand \n`knuckle_detail.html `_ \nfiles.\n\nHelp Out\n--------\n\nFound a bug? File an issue at `Github\n`_. Have an improvement? Fork\nit and add it, or if you can\u2019t code it, File an `issue\n`_ and we'll do it.\n\nAre you using or thinking of using ``django-model-filters``? Please `drop a \nline `_ and let us know what for. \nKnowing how people use it in the wild will help us make it better!\n\nDevelopment\n~~~~~~~~~~~\n\nDownload the code and then::\n\n $ pip install -r requirements.txt\n \nRunning Tests\n~~~~~~~~~~~~~\n\nEven simple packages need tests::\n\n $ python tests.py --with-coverage --cover-package=model_block\n\nRun it before and after you make any changes. Try to not let that number drop.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/mjumbewu/django-model-blocks/downloads", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mjumbewu/django-model-blocks/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-model-blocks", "package_url": "https://pypi.org/project/django-model-blocks/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-model-blocks/", "project_urls": { "Download": "https://github.com/mjumbewu/django-model-blocks/downloads", "Homepage": "https://github.com/mjumbewu/django-model-blocks/" }, "release_url": "https://pypi.org/project/django-model-blocks/0.8.10/", "requires_dist": null, "requires_python": null, "summary": "Simple filters and tags for generic Django model template partials", "version": "0.8.10" }, "last_serial": 338925, "releases": { "0.8.1": [ { "comment_text": "", "digests": { "md5": "a77073e6f8b8426a6109469c8cad6567", "sha256": "86d47e8fc8e0ce6f5888d066277d5af5f27599e800c980253caf267e1d912f6f" }, "downloads": -1, "filename": "django-model-blocks-0.8.1.tar.gz", "has_sig": false, "md5_digest": "a77073e6f8b8426a6109469c8cad6567", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7568, "upload_time": "2011-06-22T07:49:13", "url": "https://files.pythonhosted.org/packages/9c/cf/b6ab5fe280ec7b5c4816dd7bb2850bd45f6889e0be601cbace7924f7218e/django-model-blocks-0.8.1.tar.gz" } ], "0.8.10": [ { "comment_text": "", "digests": { "md5": "e40ab4c4e624d2ea2f2ab912ca42c63e", "sha256": "7f96b0217a49a884ce9636f891154217249854557b2466502f940a9645d34f7c" }, "downloads": -1, "filename": "django-model-blocks-0.8.10.tar.gz", "has_sig": false, "md5_digest": "e40ab4c4e624d2ea2f2ab912ca42c63e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11270, "upload_time": "2011-09-20T20:44:13", "url": "https://files.pythonhosted.org/packages/f5/2c/ac8871859c62dc37ecc8a56eda2ab3f96db09e374704da5683621de733be/django-model-blocks-0.8.10.tar.gz" } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "b50717cef058d9e262cceb94c4d61de1", "sha256": "2674b22f7dd10cd26fbdd5332a8e46a6220a31d4ac481e123e6d49dd9e85043c" }, "downloads": -1, "filename": "django-model-blocks-0.8.2.tar.gz", "has_sig": false, "md5_digest": "b50717cef058d9e262cceb94c4d61de1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9861, "upload_time": "2011-06-22T20:53:03", "url": "https://files.pythonhosted.org/packages/66/9e/fabb1891182e588e3c4f334a30c15df5c73129ef96fc1b0b0979c6e294ad/django-model-blocks-0.8.2.tar.gz" } ], "0.8.3": [ { "comment_text": "", "digests": { "md5": "88cc6c8e3d377d29fa4a15c55e0b48aa", "sha256": "0b4600e384fd2706f3cc07f55cd8998d8ce20f32aebafb52023248d388db197b" }, "downloads": -1, "filename": "django-model-blocks-0.8.3.tar.gz", "has_sig": false, "md5_digest": "88cc6c8e3d377d29fa4a15c55e0b48aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9849, "upload_time": "2011-07-16T08:34:41", "url": "https://files.pythonhosted.org/packages/3b/a1/665f5df7c10b0ef6e3a30c88efea6807dcd783202b1dbebe6244b2866adf/django-model-blocks-0.8.3.tar.gz" } ], "0.8.4": [ { "comment_text": "", "digests": { "md5": "05026ddcce6e02b2e17229ec3aa786ab", "sha256": "07925b0fcedd11e37d0a30e32e8a218d77126ac4c0d7feea72d8aa2a4b413e9c" }, "downloads": -1, "filename": "django-model-blocks-0.8.4.tar.gz", "has_sig": false, "md5_digest": "05026ddcce6e02b2e17229ec3aa786ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10208, "upload_time": "2011-07-29T10:18:45", "url": "https://files.pythonhosted.org/packages/e3/55/05ff5ec409bbdf52505ad2962d75c058ec922601069a1ae4fd4c78a72a14/django-model-blocks-0.8.4.tar.gz" } ], "0.8.5": [ { "comment_text": "", "digests": { "md5": "fa5a0a993025a75459b2a9ac6561073d", "sha256": "43b42579b72030d44d31977e11c6f343653c34a69ea7012795e732df0d0fb733" }, "downloads": -1, "filename": "django-model-blocks-0.8.5.tar.gz", "has_sig": false, "md5_digest": "fa5a0a993025a75459b2a9ac6561073d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10940, "upload_time": "2011-08-06T01:43:26", "url": "https://files.pythonhosted.org/packages/09/c8/93836b9a7c04a3c9429c8362225d1d4708f7e83469bedc8d08224eaf576f/django-model-blocks-0.8.5.tar.gz" } ], "0.8.6": [ { "comment_text": "", "digests": { "md5": "4e9c4453bc5bb6101638c953780258cb", "sha256": "276d785be59ae035ec6981434b18569c1f1011ef6aba7107849e4702d518ef03" }, "downloads": -1, "filename": "django-model-blocks-0.8.6.tar.gz", "has_sig": false, "md5_digest": "4e9c4453bc5bb6101638c953780258cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11093, "upload_time": "2011-08-13T17:56:45", "url": "https://files.pythonhosted.org/packages/ca/1b/66981a9dfee11d032d77003ea686f43672433f8613da3b4bea43a88a3d30/django-model-blocks-0.8.6.tar.gz" } ], "0.8.7": [ { "comment_text": "", "digests": { "md5": "33b887a8543c1c6d010af163867c5d39", "sha256": "3a0f329a56cb8f9689aa698c35368b524ddd6cd10f27f13ad5f8a618b59bb34b" }, "downloads": -1, "filename": "django-model-blocks-0.8.7.tar.gz", "has_sig": false, "md5_digest": "33b887a8543c1c6d010af163867c5d39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11129, "upload_time": "2011-09-02T11:43:44", "url": "https://files.pythonhosted.org/packages/ab/95/095557de7d0bf5afedcf7b073788a56209468d23cb7cfe0ceab1391500df/django-model-blocks-0.8.7.tar.gz" } ], "0.8.8": [ { "comment_text": "", "digests": { "md5": "ae1a2d92972384004046ea43baf5b8b4", "sha256": "b3b040e3a3d4bcd1ad5fa986f31ff12e301606475e78cc2adcf63c93bdcebf15" }, "downloads": -1, "filename": "django-model-blocks-0.8.8.tar.gz", "has_sig": false, "md5_digest": "ae1a2d92972384004046ea43baf5b8b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11131, "upload_time": "2011-09-02T12:01:07", "url": "https://files.pythonhosted.org/packages/07/a9/8a438a4b397a7c95717e995475afbacef3460b4e0892b2278125382bb82d/django-model-blocks-0.8.8.tar.gz" } ], "0.8.9": [ { "comment_text": "", "digests": { "md5": "3aa77c30eae9ad54c6ac5c687b89cff3", "sha256": "4812fad0d5fbe964e0eb85699b83a27e8b1703fd43de6833cd3544550ac2b392" }, "downloads": -1, "filename": "django-model-blocks-0.8.9.tar.gz", "has_sig": false, "md5_digest": "3aa77c30eae9ad54c6ac5c687b89cff3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11260, "upload_time": "2011-09-02T18:56:41", "url": "https://files.pythonhosted.org/packages/07/39/ed965f41bdaf97ff0a22a60ecd4b525502e3474534bfa642b47bc755abe8/django-model-blocks-0.8.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e40ab4c4e624d2ea2f2ab912ca42c63e", "sha256": "7f96b0217a49a884ce9636f891154217249854557b2466502f940a9645d34f7c" }, "downloads": -1, "filename": "django-model-blocks-0.8.10.tar.gz", "has_sig": false, "md5_digest": "e40ab4c4e624d2ea2f2ab912ca42c63e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11270, "upload_time": "2011-09-20T20:44:13", "url": "https://files.pythonhosted.org/packages/f5/2c/ac8871859c62dc37ecc8a56eda2ab3f96db09e374704da5683621de733be/django-model-blocks-0.8.10.tar.gz" } ] }