{ "info": { "author": "Anton Linevych", "author_email": "mail@linevich.net", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Django-mobile-template\n----------------------\n\n.. image:: https://travis-ci.org/linevich/django-mobile-template.svg?branch=master\n :target: https://travis-ci.org/linevich/django-mobile-template\n\nSimple django app that dynamically change :code:`template_name` of your view based on domain name\n(e.g example.com and m.example.com).\n\nUseful in case if you already have third party service that redirects to the mobile version of your site.\n\nInstallation\n============\n\n.. code-block:: bash\n\n pip install django-mobile-template\n # OR\n pip install git+https://github.com/linevich/django-mobile-template.git\n\n.. code-block:: python\n\n INSTALLED_APPS = [\n ...\n 'mobile_template',\n ...\n ]\n\nUsage\n=====\n\nPlease note: :code:`MobileTemplateView` should be **first parent class**.\n\n.. code-block:: python\n\n # views.py\n\n from django.views.generic import TemplateView\n from mobile_template.views import MobileTemplateView\n\n\n class Home(MobileTemplateView, TemplateView):\n template_name = 'index.html'\n\nTemplates folder structure:\n\n.. code-block::\n\n templates\n \u251c\u2500\u2500 base.html\n \u251c\u2500\u2500 index.html\n \u2514\u2500\u2500 mobile\n \u2514\u2500\u2500 index.html\n\n\nConfiguration\n=============\n\n- :code:`MOBILE_TEMPLATES_PREFIX` (Default: :code:`mobile/`) \u2014 mobile templates subfolder.\n- :code:`MOBILE_DOMAIN_REGEX` (Default: :code:`^m.\\.*.\\.*.*'`) \u2014 regular expression to capture mobile domains.\n By default it captures all domains started with m..", "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/linevich/django-mobile-template", "keywords": null, "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "django-mobile-template", "package_url": "https://pypi.org/project/django-mobile-template/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-mobile-template/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/linevich/django-mobile-template" }, "release_url": "https://pypi.org/project/django-mobile-template/0.1/", "requires_dist": null, "requires_python": null, "summary": "Simple app that dynamically changes the templates based on domain/subdomain.", "version": "0.1" }, "last_serial": 2543918, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "63f659fc1335fdf38be8081d8f32048a", "sha256": "d39b02f726dfd1381687c455521ed069c4be3e4926401c46df6d69b10279db98" }, "downloads": -1, "filename": "django-mobile-template-0.1.tar.gz", "has_sig": false, "md5_digest": "63f659fc1335fdf38be8081d8f32048a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2761, "upload_time": "2016-12-29T09:33:23", "url": "https://files.pythonhosted.org/packages/b2/83/051e24edeaf21d46ac11f2e45113d7a82978e3636689fd5e61ce9efa73a3/django-mobile-template-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "63f659fc1335fdf38be8081d8f32048a", "sha256": "d39b02f726dfd1381687c455521ed069c4be3e4926401c46df6d69b10279db98" }, "downloads": -1, "filename": "django-mobile-template-0.1.tar.gz", "has_sig": false, "md5_digest": "63f659fc1335fdf38be8081d8f32048a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2761, "upload_time": "2016-12-29T09:33:23", "url": "https://files.pythonhosted.org/packages/b2/83/051e24edeaf21d46ac11f2e45113d7a82978e3636689fd5e61ce9efa73a3/django-mobile-template-0.1.tar.gz" } ] }