{ "info": { "author": "Keryn Knight", "author_email": "django-path2css@kerynknight.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "django-path2css\n===============\n\n:author: Keryn Knight\n:version: 0.2.2\n\n.. |travis_stable| image:: https://travis-ci.org/kezabelle/django-path2css.svg?branch=0.2.2\n :target: https://travis-ci.org/kezabelle/django-path2css\n\n.. |travis_master| image:: https://travis-ci.org/kezabelle/django-path2css.svg?branch=master\n :target: https://travis-ci.org/kezabelle/django-path2css\n\n============== ======\nRelease Status\n============== ======\nstable (0.2.2) |travis_stable|\nmaster |travis_master|\n============== ======\n\n\nWhat it does\n------------\n\nA small Django package for rendering a request's URL as a series of CSS class names,\nsuch that one can target sections or individual parts of a site using CSS only.\n\nIt can also look for path specific CSS files, and output those for you.\n\nGenerating class names\n^^^^^^^^^^^^^^^^^^^^^^\n\nFor example, say all your blog posts are under ``/blog/``, then you might do::\n\n {% load path2css %}\n ...\n\nSubsequently, going to ``/blog/``, ``/blog/post/``, ``/blog/post/comments/`` etc\nwill all have the ``blog`` CSS class added to the body, which you could then use::\n\n body.blog {...}\n body.blog-post {...}\n body.blog-post-comments {...}\n\nNote that blog-post-comments, being the deepest namespace reached, would also have\nthe ``blog`` and ``blog-post`` classes added.\n\nRequest specific CSS files\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf you have a URL like ``/blog/post/4/``, using the ``{% css4path %}`` tag\nallows you to load hierarchy specific CSS files::\n\n {% load path2css %}\n \n {% css4path request.path %}\n\nmight output the following::\n\n \n \n\n...if those files exist in one of your static directories. In the above example,\nI've not created a ``blog-post.css`` file, so the template tag knows not to\nload it for output, because it would be a 404. It should only ever include files\nthat do exist.\n\nThis allows you to compartmentalise your CSS files into separate parts, like\nwe used to do in the old days when websites were often hand-crafted and different\nsections had a different look and feel, or whatever, before the inevitable rise\nof CMS made things a little more homogenized.\n\n\nInstallation\n------------\n\nIt the stable release is on PyPI::\n\n pip install django-path2css==0.2.2\n\n\nThe templatetags\n----------------\n\nIn case you're already using the class names that would be generated, ``{% path2css %}``\ntakes a ``prefix=x`` and/or ``suffix=y`` parameter, so that you can re-namespace things\nwithout clobbering your existing styles::\n\n {% path2css '/blog/post/' prefix='path-' %}\n {% path2css '/blog/post/' suffix='-area' %}\n {% path2css '/blog/post/' prefix='pre_' suffix='_post' %}\n\nThe ``{% css4path %}`` takes the same ``prefix``/``suffix`` parameters, and\nalso takes an optional ``directory``, whose default value is ``css``\n\nThe context processor\n---------------------\n\nThere's also a context processor which may be used by adding ``path2css.context_processor``\nto your existing list. It does the same thing as ``{% path2css %}`` with no\nprefix/suffix arguents.\n\n\nSupported Django versions\n-------------------------\n\nThe tests are run against Django 1.8 through 1.10, and Python 2.7, 3.3, 3.4 and 3.5.\n\n\nRoadmap\n-------\n\nIf I ever have a need for it, a JavaScript equivalent that can consume\nwindow.location.path or whatever ... and potentially bridges to things like\nangular, I guess?\n\n\nThe license\n-----------\n\nIt's the `FreeBSD`_. There's should be a ``LICENSE`` file in the root of the repository, and in any archives.\n\n.. _FreeBSD: http://en.wikipedia.org/wiki/BSD_licenses#2-clause_license_.28.22Simplified_BSD_License.22_or_.22FreeBSD_License.22.29\n\n\n----\n\nCopyright (c) 2016, Keryn Knight\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n----\n\nChange history for django-path2css\n-------------------------------------------------------------\n0.2.2\n^^^^^^\n* Fix long description.\n\n0.2.1\n^^^^^^\n* Exposed the ``split_on`` kwarg to the ``{% path2css %}`` and\n ``{% css4path %}`` template tags, allowing for splitting based on patterns\n other than ``/``.\n\n0.2.0\n^^^^^^\n* Added support for searching staticfiles directories for CSS files matching\n path components, see ``{% css4path %}`` for usage.\n\n0.1.1\n^^^^^^\n* First release - tests for the template tag & context processor passing on\n all of the ``tox`` matrix.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kezabelle/django-path2css", "keywords": "django path2css", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-path2css", "package_url": "https://pypi.org/project/django-path2css/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-path2css/", "project_urls": { "Homepage": "https://github.com/kezabelle/django-path2css" }, "release_url": "https://pypi.org/project/django-path2css/0.2.2/", "requires_dist": [ "Django (>=1.8)" ], "requires_python": "", "summary": "Convert a request.path ('/a/b/c/d/') into CSS class names", "version": "0.2.2" }, "last_serial": 2658948, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "de841f705bd639a5982f91311d823003", "sha256": "795c0d84e1f22b1cea13a78c6c8185e489bb384690d28a798d504ae547eb9aca" }, "downloads": -1, "filename": "django_path2css-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "de841f705bd639a5982f91311d823003", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9891, "upload_time": "2016-11-16T11:13:31", "url": "https://files.pythonhosted.org/packages/bf/38/3519cc03fdb2e59b7e56d0f00d29865bb6d9c4c5d0ca731d319745d4bc98/django_path2css-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0eba4241a80518a8556e788e039858d6", "sha256": "85924a0a05f214492ed0e019c8cac9f4dd1e1dbdf0c61ac4c6b5343f154388a9" }, "downloads": -1, "filename": "django-path2css-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0eba4241a80518a8556e788e039858d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7792, "upload_time": "2016-11-16T11:13:33", "url": "https://files.pythonhosted.org/packages/e9/5c/cfbc4cea5a8f6a89a60d499371c9562eb3fa08f72381d231b59f25424d76/django-path2css-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "5b1f41009a7a184358996d97a397d69f", "sha256": "8c31d4c176dd332d0ae3cf7a6402b939f4205f2ba03e0e84e6d8afe382130472" }, "downloads": -1, "filename": "django_path2css-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5b1f41009a7a184358996d97a397d69f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12801, "upload_time": "2016-12-02T09:37:58", "url": "https://files.pythonhosted.org/packages/e6/2a/861cc036dfc9c7f4c96335c50ea1b4a9c3f08406f9b97f5b53de350d6c6c/django_path2css-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "458657da30a34c819fe2504d10512b5d", "sha256": "d2a40f7021245965b02380aed74b6e063b50b22ca401852f30a5514d41291505" }, "downloads": -1, "filename": "django-path2css-0.2.0.tar.gz", "has_sig": false, "md5_digest": "458657da30a34c819fe2504d10512b5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11326, "upload_time": "2016-12-02T09:38:00", "url": "https://files.pythonhosted.org/packages/83/44/600ddf94b571e2e103adc2d474de64980760d5d744af948f07f82d5d2b3c/django-path2css-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "02a65eee18c676cc19e3483f73f245b9", "sha256": "ff8e29fed871b907a4c35e15687ae0022b73dfa989b0a62f545c9bca6ef3e6fc" }, "downloads": -1, "filename": "django_path2css-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "02a65eee18c676cc19e3483f73f245b9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13547, "upload_time": "2017-02-21T21:24:32", "url": "https://files.pythonhosted.org/packages/c0/e2/5ba94576ec72d2d8473c9d5ca35c699bead2dcdfd4820c3a645cb7081849/django_path2css-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f79653e36038dd89c70ce58ff0ca99e4", "sha256": "1bce01d62f03a353a4573e289351da470b05c353a27606010994c71c1208c173" }, "downloads": -1, "filename": "django-path2css-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f79653e36038dd89c70ce58ff0ca99e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11851, "upload_time": "2017-02-21T21:24:34", "url": "https://files.pythonhosted.org/packages/2c/03/52353e47121ab382b7b48c7c98ddbfb67244d1ef51915b92feb52059be54/django-path2css-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "c82e7082f2d8b98b24e408fefaf61500", "sha256": "2d8269b57e25f0e4f87a2f22992cf550042a60670693c5b3f3e6fd86294ddd08" }, "downloads": -1, "filename": "django_path2css-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c82e7082f2d8b98b24e408fefaf61500", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13574, "upload_time": "2017-02-21T21:31:53", "url": "https://files.pythonhosted.org/packages/85/4a/09e5e415792fddf172a5e87d75e96c39651c6334cacbc5de83ca8c28db7b/django_path2css-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4f86ba6c8663e2d481d85c3b6df853dd", "sha256": "638eda11b6c21b177bb4246f80b4cccc8506a566535b732049866d5187e61140" }, "downloads": -1, "filename": "django-path2css-0.2.2.tar.gz", "has_sig": false, "md5_digest": "4f86ba6c8663e2d481d85c3b6df853dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11889, "upload_time": "2017-02-21T21:31:56", "url": "https://files.pythonhosted.org/packages/51/b7/5b4ccf7371118da6e9aa3ff814d4a90786a0be4899e079ab8e1a28aa94a0/django-path2css-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c82e7082f2d8b98b24e408fefaf61500", "sha256": "2d8269b57e25f0e4f87a2f22992cf550042a60670693c5b3f3e6fd86294ddd08" }, "downloads": -1, "filename": "django_path2css-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c82e7082f2d8b98b24e408fefaf61500", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13574, "upload_time": "2017-02-21T21:31:53", "url": "https://files.pythonhosted.org/packages/85/4a/09e5e415792fddf172a5e87d75e96c39651c6334cacbc5de83ca8c28db7b/django_path2css-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4f86ba6c8663e2d481d85c3b6df853dd", "sha256": "638eda11b6c21b177bb4246f80b4cccc8506a566535b732049866d5187e61140" }, "downloads": -1, "filename": "django-path2css-0.2.2.tar.gz", "has_sig": false, "md5_digest": "4f86ba6c8663e2d481d85c3b6df853dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11889, "upload_time": "2017-02-21T21:31:56", "url": "https://files.pythonhosted.org/packages/51/b7/5b4ccf7371118da6e9aa3ff814d4a90786a0be4899e079ab8e1a28aa94a0/django-path2css-0.2.2.tar.gz" } ] }