{ "info": { "author": "Vitek Pliska", "author_email": "whit@jizak.cz", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "django-devicetype-templates\n===========================\n\ndjango-devicetype-templates is a library that detect device type by browser's user agent string\nand serves different templates for each type.\n\nIf standard responsive layouts does not fit all of your needs\nand if you do not want to use some hacky template loaders with thread locals,\nyou may find this library useful.\n\n\nRequirements\n------------\n\n * Django >= 1.7\n * Tested with Python versions 2.7, 3.3, 3.4, 3.5\n * It uses `process_template_response`_ middleware method, so your views should returns ``TemplateResponse``.\n\n\nInstallation\n------------\n\nInstall from PyPi::\n\n pip install django-devicetype-templates\n\n\nInstall development version to virtualenv::\n\n git clone https://github.com/whit/django-devicetype-templates.git\n cd django-devicetype-templates\n python setup.py develop\n\nRun tests::\n\n pip intsall -r requirements-dev.txt\n py.test\n\n.. _process_template_response: https://docs.djangoproject.com/en/dev/topics/http/middleware/#process_template_response\n\n\nConfiguration\n-------------\n\nAdd middleware::\n\n MIDDLEWARE_CLASSES = (\n ...\n 'devicetype.middleware.DeviceTypeMiddleware',\n )\n\nIf you need to use some variables in your templates, you can add devicetype context processor::\n\n TEMPLATE_CONTEXT_PROCESSORS = (\n ...\n 'devicetype.context_processors.devicetype',\n )\n\nThen, in templates will be available these variables: ``devicetype``, ``is_mobile``, ``is_tablet``\nand ``big_resolution`` (not implemented yet).\n\n\nOther settings\n--------------\n\n``DEBUG_DEVICETYPE_NOCOOKIE``\n-----------------------------\n\nFor development purposes if you want to switch user agents oftenly.\nCookie max age wil be set to 5 seconds.\n\n\n``DEVICETYPE_TEMPLATE_PREFIX``\n------------------------------\n\nPrefixes are variable. When you need prefix template file name, use something like ``tablet-``. If you want to have\ndevice-specific templates in subfolders, you can use ``tablet/`` prefix for example.\n\nDefault::\n\n {\n 'desktop': '',\n 'mobile': 'mobile/',\n 'tablet': 'tablet/',\n }\n\n``DEVICETYPE_PREFIX_BASENAME``\n------------------------------\n\nWhen you use folder-like prefix, like `tablet/` and `mobile/`, with this setting\nyou can select how subfolders will be detected.\n\nWith ``DEVICETYPE_PREFIX_BASENAME = False`` (default)::\n\n tablet/base.html\n tablet/app/app_base.html\n tablet/layout/three-cols.html\n ...\n\nWith ``DEVICETYPE_PREFIX_BASENAME = True``::\n\n tablet/base.html\n app/tablet/app_base.html\n layout/tablet/three-cols.html\n ...\n\n\n``DEVICETYPE_MOBILE_PATTERNS`` and ``DEVICETYPE_TABLET_PATTERNS``\n-----------------------------------------------------------------\n\nYou can override default search patterns. It search in tablet patterns first.\n\n\nBuild status\n------------\n\n:Master branch:\n\n .. image:: https://secure.travis-ci.org/whit/django-devicetype-templates.png?branch=master\n :alt: Travis CI - Distributed build platform for the open source community\n :target: http://travis-ci.org/#!/whit/django-devicetype-templates\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/whit/django-devicetype-templates", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-devicetype-templates", "package_url": "https://pypi.org/project/django-devicetype-templates/", "platform": "", "project_url": "https://pypi.org/project/django-devicetype-templates/", "project_urls": { "Homepage": "https://github.com/whit/django-devicetype-templates" }, "release_url": "https://pypi.org/project/django-devicetype-templates/0.2.3/", "requires_dist": null, "requires_python": "", "summary": "Django library to serve different templates for different device types", "version": "0.2.3" }, "last_serial": 2955418, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "418c223fecc31fc4070c874841b69629", "sha256": "a0d3d4176368128a6dbce9741a6862da55bebe658e854faa3289f1756356bb48" }, "downloads": -1, "filename": "django-devicetype-templates-0.1.2.tar.gz", "has_sig": false, "md5_digest": "418c223fecc31fc4070c874841b69629", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4175, "upload_time": "2013-01-07T15:59:05", "url": "https://files.pythonhosted.org/packages/97/ea/78e811722e9b676af6c2548337ccdc7f9bcc249884a50b05cb3f3bcf3441/django-devicetype-templates-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "c5ba71f80b06ff1595bc37fb75ccafe8", "sha256": "7b1f78a02c9801aeff136e2667b28228dede9bd210579dd8cf6fd22233d43700" }, "downloads": -1, "filename": "django-devicetype-templates-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c5ba71f80b06ff1595bc37fb75ccafe8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4335, "upload_time": "2013-01-08T15:59:24", "url": "https://files.pythonhosted.org/packages/9c/f5/79af7d930b1b03c638687c3347aa79e5615e52c261dad327991d522e4279/django-devicetype-templates-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "bb7f0f7b86e003c50939f988a7423853", "sha256": "8a29b7e72cf3c2e4482e250f9371bad4d1d2eb82d08e132a7adb2af68d8a202b" }, "downloads": -1, "filename": "django-devicetype-templates-0.1.4.tar.gz", "has_sig": false, "md5_digest": "bb7f0f7b86e003c50939f988a7423853", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4456, "upload_time": "2013-01-08T16:25:21", "url": "https://files.pythonhosted.org/packages/70/f8/613bd9b91b94d4363a0bf53e9d72da0c6c096be2ed82a9935f70b9fd7745/django-devicetype-templates-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "07d51fa729476e5313ad25ec2a77d080", "sha256": "cd90460a92d33acec1c5663844bfd64244eac8475625c567c801379211c9f46d" }, "downloads": -1, "filename": "django_devicetype_templates-0.1.5-py27-none-any.whl", "has_sig": false, "md5_digest": "07d51fa729476e5313ad25ec2a77d080", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5318, "upload_time": "2013-02-18T21:44:34", "url": "https://files.pythonhosted.org/packages/72/fc/f41fb5a2748a85b89eb473660d145f1a3b31c3ade6cad5fbe9617eb5e154/django_devicetype_templates-0.1.5-py27-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2e43485bcc67f6ec2a9a36493cfc38b5", "sha256": "facf5bc7e3af97cce1adcde5c26d640879dfa551a2ab0dd43479d652ae7d78c9" }, "downloads": -1, "filename": "django-devicetype-templates-0.1.5.tar.gz", "has_sig": false, "md5_digest": "2e43485bcc67f6ec2a9a36493cfc38b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4498, "upload_time": "2013-02-18T21:44:15", "url": "https://files.pythonhosted.org/packages/39/eb/b41c7f1b6f541fcb2dd02a48417e85be258521e5ae034ffc198488ed9220/django-devicetype-templates-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "af664aa0d6f820cff509313093012ae9", "sha256": "fa47b12d3c0bd32311348594de2d664950de25aec5be0c6bdd7b34493c35d55f" }, "downloads": -1, "filename": "django_devicetype_templates-0.1.6-py27-none-any.whl", "has_sig": false, "md5_digest": "af664aa0d6f820cff509313093012ae9", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5336, "upload_time": "2013-03-29T22:39:55", "url": "https://files.pythonhosted.org/packages/5a/0e/7dfd12e011487924f5764622fa7f23b1aa17f7314dc03ad6b2b2ea9fd33b/django_devicetype_templates-0.1.6-py27-none-any.whl" }, { "comment_text": "", "digests": { "md5": "761706c62e92ee86cd3be08ea732031c", "sha256": "92cb2b2ccd4d6c5c139d6714565d91bb78637023e08e0c1eb66b7c24e0227a40" }, "downloads": -1, "filename": "django-devicetype-templates-0.1.6.tar.gz", "has_sig": false, "md5_digest": "761706c62e92ee86cd3be08ea732031c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4502, "upload_time": "2013-03-29T22:39:53", "url": "https://files.pythonhosted.org/packages/86/b5/d624bc6e932511163437507552a4614c50d93e6f6876c95a99eed6feb790/django-devicetype-templates-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "00dd122a424c8d9407bd6b22e8f79019", "sha256": "6576fa0f1278d65ea1b388751f711569d6b8290698a1951700059c1f16bb6a32" }, "downloads": -1, "filename": "django_devicetype_templates-0.1.7-py27-none-any.whl", "has_sig": false, "md5_digest": "00dd122a424c8d9407bd6b22e8f79019", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5335, "upload_time": "2013-05-03T12:02:37", "url": "https://files.pythonhosted.org/packages/24/cb/9d15897e4a52426d518fc9b5472784100031a15d6d14ff36ade7291a99cd/django_devicetype_templates-0.1.7-py27-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7fed0092412689882e870635bba3069c", "sha256": "1297b166cf3d7c5cc9f6269b9f5f9e047932396f0559431667ca25aba6f1edd0" }, "downloads": -1, "filename": "django-devicetype-templates-0.1.7.tar.gz", "has_sig": false, "md5_digest": "7fed0092412689882e870635bba3069c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4512, "upload_time": "2013-05-03T12:02:34", "url": "https://files.pythonhosted.org/packages/4e/3c/9b53df5798f0545a056c8a48ed4a179b050730a8e5375d588191ccc15d1f/django-devicetype-templates-0.1.7.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "d76418acc328b482ac899d23ef1dad4f", "sha256": "fc3e4c44e5b29390011126c61ab74ef7a4d68a1bec707a74f7b8b29c529d8d9c" }, "downloads": -1, "filename": "django_devicetype_templates-0.1.9-py27-none-any.whl", "has_sig": false, "md5_digest": "d76418acc328b482ac899d23ef1dad4f", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7575, "upload_time": "2013-11-18T13:59:43", "url": "https://files.pythonhosted.org/packages/da/44/770524ba091fff4c985ff30e0653d484f3cc11f969b92372d26f26ae287c/django_devicetype_templates-0.1.9-py27-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2e6e4ddd7c305b8f7d4afcf8f96a0ea3", "sha256": "755f69fcfd1ce4c6b9744b54750c51795702f922a0ef460701f553f72652551c" }, "downloads": -1, "filename": "django-devicetype-templates-0.1.9.tar.gz", "has_sig": false, "md5_digest": "2e6e4ddd7c305b8f7d4afcf8f96a0ea3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4517, "upload_time": "2013-11-18T13:59:41", "url": "https://files.pythonhosted.org/packages/0a/16/0f468badc656f530db422bd36d4382bb688841b8a97dd5ea6cb25ff45524/django-devicetype-templates-0.1.9.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7906110f50b480637c9df9b4bcaa638b", "sha256": "cb2ff0c9b84eb628f41edc5476bff0a49cb10c03a83b7b88dae5fdab6ceaaaa2" }, "downloads": -1, "filename": "django_devicetype_templates-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7906110f50b480637c9df9b4bcaa638b", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7571, "upload_time": "2016-03-18T20:33:09", "url": "https://files.pythonhosted.org/packages/4c/bd/96d435fb24d932e48c0820eccb6f89d41ea2f1cb421619c92cade5bd5609/django_devicetype_templates-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e3d0714d105fde6e6aad3a7fb9be78e", "sha256": "e02801d56b2972844591df99e2188c0c8d5412490f714bf6845d53b3b281bed0" }, "downloads": -1, "filename": "django-devicetype-templates-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3e3d0714d105fde6e6aad3a7fb9be78e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4618, "upload_time": "2016-03-18T20:32:51", "url": "https://files.pythonhosted.org/packages/dc/09/55bd079c81861dafd12f4a8d9a4fa9e57bf78af933022605c8322ac38ec6/django-devicetype-templates-0.2.0.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "ff97f53a41b0653faddb03cd3619da57", "sha256": "b35a469c6e7e1457bf5a55bb41086951196ee5c3f502c3c5ac26acd128a6c26f" }, "downloads": -1, "filename": "django_devicetype_templates-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ff97f53a41b0653faddb03cd3619da57", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7994, "upload_time": "2016-03-19T09:26:25", "url": "https://files.pythonhosted.org/packages/d6/60/39d7b6fe16744f5cb6608a8cdf3c19d40337bdb52e244bc607b869e27c59/django_devicetype_templates-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "69bd15580634a0aaeb33b2f29b39deb6", "sha256": "c425acdd68d4304dcee0a80b303ddadb136da1bce18172f6c6861946e35003c6" }, "downloads": -1, "filename": "django-devicetype-templates-0.2.2.tar.gz", "has_sig": false, "md5_digest": "69bd15580634a0aaeb33b2f29b39deb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4911, "upload_time": "2016-03-19T09:25:54", "url": "https://files.pythonhosted.org/packages/ea/b5/6b5148dad5f2c79c0eb07a25130b9717b47b62880ce464b2968f81d6a272/django-devicetype-templates-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "e274adc8caaeecc4fd2c9cc4dd389b77", "sha256": "c1ba695865edf1ec43da0d1c218b9e637e239993c6f072c1d7f3b44dfcf6e7f9" }, "downloads": -1, "filename": "django_devicetype_templates-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e274adc8caaeecc4fd2c9cc4dd389b77", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8034, "upload_time": "2017-06-16T20:57:14", "url": "https://files.pythonhosted.org/packages/5f/14/da029ee4da523fb072ef65fd523c8c60ff0ad47b78eb21cb7bf34084544c/django_devicetype_templates-0.2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1a8c69be43f793a10927e4cd01cf92f", "sha256": "588eee2b3061decad53614108ef13ed5e0e197cc8ed21b5c677f2040acc22326" }, "downloads": -1, "filename": "django-devicetype-templates-0.2.3.tar.gz", "has_sig": false, "md5_digest": "f1a8c69be43f793a10927e4cd01cf92f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4955, "upload_time": "2017-06-16T20:57:12", "url": "https://files.pythonhosted.org/packages/53/92/40facf190b46f6131328da3462b8c464dc14945279bf0b9dbb1d2d2ce796/django-devicetype-templates-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e274adc8caaeecc4fd2c9cc4dd389b77", "sha256": "c1ba695865edf1ec43da0d1c218b9e637e239993c6f072c1d7f3b44dfcf6e7f9" }, "downloads": -1, "filename": "django_devicetype_templates-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e274adc8caaeecc4fd2c9cc4dd389b77", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8034, "upload_time": "2017-06-16T20:57:14", "url": "https://files.pythonhosted.org/packages/5f/14/da029ee4da523fb072ef65fd523c8c60ff0ad47b78eb21cb7bf34084544c/django_devicetype_templates-0.2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1a8c69be43f793a10927e4cd01cf92f", "sha256": "588eee2b3061decad53614108ef13ed5e0e197cc8ed21b5c677f2040acc22326" }, "downloads": -1, "filename": "django-devicetype-templates-0.2.3.tar.gz", "has_sig": false, "md5_digest": "f1a8c69be43f793a10927e4cd01cf92f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4955, "upload_time": "2017-06-16T20:57:12", "url": "https://files.pythonhosted.org/packages/53/92/40facf190b46f6131328da3462b8c464dc14945279bf0b9dbb1d2d2ce796/django-devicetype-templates-0.2.3.tar.gz" } ] }