{ "info": { "author": "Yohann Gabory", "author_email": "yohann.gabory@novapost.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3" ], "description": "Custom Theme\n============\n\n.. image:: https://travis-ci.org/novapost/django-pimpmytheme.png?branch=master\n :target: https://travis-ci.org/novapost/django-pimpmytheme\nPer client/user/whatever django template and statics theming\n\nWHY\n===\n\nWhen you need to use custom template and/or styling based on a model\nin your app (Site, User, etc...).\n\npimpmytheme will create a folder per \"client\" (a client can be a\nUser, a Site or everything that implement the get_current method (see\nbelow). It also can be used for multiple projects at the same\ntime. The folders are under a project name folder located in the\npimpmytheme directory. Your designer can then pull/push this\nrepository to edit the whole look and feel of all your projects in the\nsame repository!\n\nHow\n===\n\nwith the help of custom template loader ans static file loader,\npimpmytheme load the custom template and statics files if they exists\nfor the current object.\n\nINSTALLATION\n============\n\n >>> pip install pimpmytheme\n\nCONFIGURATION\n=============\n\nadd pimpmytheme in your INSTALLED_APPS :\n\n INSTALLED_APPS = ('pimpmytheme',\n ...\n )\n\nadd the pimpmytheme staticfiles_finder to your STATICFILES_FINDERS :\n\n STATICFILES_FINDERS = (\n \"pimpmytheme.static_finder.CustomFinder\",\n \"django.contrib.staticfiles.finders.AppDirectoriesFinder\",\n )\n\nadd the custom template loader to your TEMPLATE_LOADERS:\n\n TEMPLATE_LOADERS = (\n 'pimpmytheme.template_loader.Loader',\n 'django.template.loaders.app_directories.Loader',\n )\n\nfinaly, you need a model with the \"get_current\" method. get_current\nwill return the object responsible for customization. For example, you\ncan use the django.contrib.sites.Site model to customize your project\nper a site basis:\n\n CUSTOM_THEME_LOOKUP_OBJECT = \"django.contrib.sites.models.Site\"\n CUSTOM_THEME_LOOKUP_ATTR = \"name\"\n\nTo create the needed folders for customization, you can run the\nmanagement command provided by pimpmytheme:\n\n $ python manage.py create_folders\n\ninside custom_form you will get a folder named as your project\nname. Inside this folder you wil get as many folder as you\ncustomization model objects. If you use the Site, you will get a\nexample.com folder.\n\nInside this folder you will find a static folder containing an empty\ncustom.less file. Here for your convenience. you can start editing\nthis file to customize your style.\n\nYou can also create a template folder next to the static one and put\nsome custom templates in it.\n\nthe pimpmytheme template loader will first look in this directory to\nload templates files. If not found, it will fallback on the django\ntemplate loader\n\nNOTE\n====\n\nthanks to https://github.com/leotrouvtou for helping finding the\nproject name", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/novapost/pimpmytheme", "keywords": null, "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "pimpmytheme", "package_url": "https://pypi.org/project/pimpmytheme/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pimpmytheme/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/novapost/pimpmytheme" }, "release_url": "https://pypi.org/project/pimpmytheme/0.1-dev/", "requires_dist": null, "requires_python": null, "summary": "Customise theme (css and template) on a per\nuser/client/whatever basis", "version": "0.1-dev" }, "last_serial": 1122521, "releases": { "0.1-dev": [ { "comment_text": "", "digests": { "md5": "b490c2a968a853d5c24dd87afe195488", "sha256": "92ed10f2c934c0b7fda9d0aa193f719e30a76f90da0822e27fa4fcf0aa3399cc" }, "downloads": -1, "filename": "pimpmytheme-0.1-dev.zip", "has_sig": false, "md5_digest": "b490c2a968a853d5c24dd87afe195488", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18047, "upload_time": "2014-06-12T08:32:00", "url": "https://files.pythonhosted.org/packages/58/ad/b047b80925c06cbbe456e0c3045730ef2458272b9f9c4cfa6ff371a78a80/pimpmytheme-0.1-dev.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b490c2a968a853d5c24dd87afe195488", "sha256": "92ed10f2c934c0b7fda9d0aa193f719e30a76f90da0822e27fa4fcf0aa3399cc" }, "downloads": -1, "filename": "pimpmytheme-0.1-dev.zip", "has_sig": false, "md5_digest": "b490c2a968a853d5c24dd87afe195488", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18047, "upload_time": "2014-06-12T08:32:00", "url": "https://files.pythonhosted.org/packages/58/ad/b047b80925c06cbbe456e0c3045730ef2458272b9f9c4cfa6ff371a78a80/pimpmytheme-0.1-dev.zip" } ] }