{ "info": { "author": "Andres Chavez", "author_email": "achavezu89@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Django Theming\n**************\n\n.. image:: https://pypip.in/v/django-theming/badge.svg?text=version&style=flat\n :target: https://pypi.python.org/pypi/django-theming\n\n.. image:: https://pypip.in/d/django-theming/badge.svg?style=flat\n :target: https://pypi.python.org/pypi/django-theming\n\n.. image:: https://pypip.in/py_versions/django-theming/badge.svg?style=flat\n :target: https://pypi.python.org/pypi/django-theming\n\n.. image:: https://pypip.in/status/django-theming/badge.svg?style=flat\n :target: https://pypi.python.org/pypi/django-theming\n \n.. image:: https://pypip.in/license/django-theming/badge.svg?style=flat\n :target: https://pypi.python.org/pypi/django-theming\n\nDjango application, implement theming concept, flexible and configurable. Allow theming for host url.\n\nInstallation\n============\n\nYou can install the most recent **Django Theming** version using pip: ::\n\n pip install django-theming\n\nSetup\n=====\n\n**NOTE**: The following settings should be added to the project file `settings.py`.\n\n1. Add 'theming' to ``INSTALLED_APPS``: ::\n\n INSTALLED_APPS += ( 'theming', )\n\n2. Add 'theming.middleware.ThemingMiddleware' to ``MIDDLEWARE_CLASSES``: ::\n\n MIDDLEWARE_CLASSES += ( 'theming.middleware.ThemingMiddleware', )\n\n2. Add 'theming.loaders.ThemeLoader' to ``TEMPLATE_LOADERS``: ::\n\n TEMPLATE_LOADERS += ( 'theming.loaders.ThemeLoader', )\n\n4. Declare ``THEME_ROOT`` and ``MEDIA_ROOT``: ::\n\n BASE_DIR = os.path.dirname(os.path.dirname(__file__))\n \n THEME_ROOT = os.path.join(BASE_DIR, 'themes')\n MEDIA_ROOT = os.path.join(BASE_DIR, 'media')\n\n5. Declare ``MEDIA_URL``: ::\n\n MEDIA_URL = '/media/'\n\n6. Declare ``THEME_MEDIA_ROOT`` y ``THEME_MEDIA_URL``: ::\n\n THEME_MEDIA_ROOT = os.path.join(MEDIA_ROOT, 'themes')\n THEME_MEDIA_URL = os.path.join(MEDIA_URL, 'themes')\n\n7. Declare host/theme config tuple ``THEME_CONFIG``: ::\n\n THEME_CONFIG = (\n (r'^(.+\\.)?dominio\\.pe', 'default'),\n (r'^(.+\\.)?test\\.pe', 'test'),\n )\n\nUsage\n=====\n\nIt should create a folder ``themes`` at the project with the following structure: ::\n\n project_django/\n | -- themes/\n | -- default/ ** theme name\n | -- templates/\n | -- media/\n | | -- styles/\n | | -- scripts/\n | | -- images/\n | -- metadata.json\n\n**NOTE**: We use ``media`` instead of ``static`` for independent assets by theme.\n\nIn the file ``metadata.json`` it should include information on the theme: ::\n\n {\n \"slug\": \"default\",\n \"name\": \"Default\",\n \"description\": \"Theme Default\",\n \"author\": \"Author\",\n \"version\": \"1.0\"\n }\n\nYou can use the template tag ``theme`` to refer to the theme assets as follows: ::\n\n \n\n**NOTE**: The tamplate tag ``theme`` will refer to the ``media/themes/`` folder, if not find the file in that path, it will search in ``static/``\n\nYou can use the command ``collectthemes`` to copy all assets of the theme to the location ``media/``: ::\n\n python manage.py collectthemes\n \n options:\n - l, --link : Create a symbolic link to each file instead of copying.\n - f, --force: Force to overwrite content.\n\nContributing\n============\n\nDevelopment of **django-theming** happens at github: https://github.com/achavezu89/django-theming\n\nCredits\n=======\n\n* Andres Chavez: https://github.com/achavezu89\n* Giorgio Leveroni: https://github.com/ppold\n* Antonio Ognio: https://github.com/gnrfan\n* Antonio Kobashikawa: https://github.com/akobashikawa", "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/achavezu89/django-theming", "keywords": "django theme template host", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "django-theming", "package_url": "https://pypi.org/project/django-theming/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-theming/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/achavezu89/django-theming" }, "release_url": "https://pypi.org/project/django-theming/1.0/", "requires_dist": null, "requires_python": null, "summary": "Django application, implement theming concept, flexible and configurable. Allow theming for host url.", "version": "1.0" }, "last_serial": 1382462, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2bc02e49f45b8431d1a7206a0248a51a", "sha256": "1508a8ed98c894a3e23f08b7f3bd40da76efd838e9ad9dcc2d8cd4b22b1812b0" }, "downloads": -1, "filename": "django-theming-0.1.tar.gz", "has_sig": false, "md5_digest": "2bc02e49f45b8431d1a7206a0248a51a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4472, "upload_time": "2014-10-29T22:59:31", "url": "https://files.pythonhosted.org/packages/61/a5/c0407d9931b061dd9d47315edb5ab6714e7dae50385cea0aa0dbcbf97beb/django-theming-0.1.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "4f3d7c12a0e8eedfc4dc7b41f70c82ac", "sha256": "de563eb8d394acaa19d18fcad34e3f41a2e6dabb123591750c700cdd7967b54d" }, "downloads": -1, "filename": "django-theming-1.0.tar.gz", "has_sig": false, "md5_digest": "4f3d7c12a0e8eedfc4dc7b41f70c82ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4693, "upload_time": "2015-01-14T16:36:57", "url": "https://files.pythonhosted.org/packages/04/ae/2efb819c7635aadb19455b1a495ffba808bbcfb3dbefbe82c2ec99f8a3b1/django-theming-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4f3d7c12a0e8eedfc4dc7b41f70c82ac", "sha256": "de563eb8d394acaa19d18fcad34e3f41a2e6dabb123591750c700cdd7967b54d" }, "downloads": -1, "filename": "django-theming-1.0.tar.gz", "has_sig": false, "md5_digest": "4f3d7c12a0e8eedfc4dc7b41f70c82ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4693, "upload_time": "2015-01-14T16:36:57", "url": "https://files.pythonhosted.org/packages/04/ae/2efb819c7635aadb19455b1a495ffba808bbcfb3dbefbe82c2ec99f8a3b1/django-theming-1.0.tar.gz" } ] }