{ "info": { "author": "Ken Cochrane", "author_email": "KenCochrane@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Browsers", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Author: Ken Cochrane\nFork of: http://minidetector.googlecode.com\nFork Description: I reorganized the code, added caching, and made a few tweaks here and there.\nDescription: Django middleware and view decorator to detect phones and small-screen devices\nVersion: 0.1.7\nLast Update: 11/17/2013\n\nRequirements:\n-------------\nDjango 1.1 or newer\nDjango caching to be enabled if you want to cache the objects\n\nHow to use:\n-----------\nUsing django-mobi is very simple. Simply place the mobi package into your project's path, and then do one of the following:\n\n\nUsing the mobi.MobileDetectionMiddleware Middleware\n---------------------------------------------------\nThis middleware will scan all incoming requests to see if it is a mobile device. If it is it will set the request.mobile property to True.\n\nTo use all you have to do is add mobi.MobileDetectionMiddleware to your MIDDLEWARE_CLASSES tuple in your settings.py\n\nThen in your view you can check request.mobile - if it's True then treat it like a small screen device. If it's False then it's probably a desktop browser, or a spider or something else.\n\nIf you want to have some items not triggered by the middleware (for example iPad) then add a settings called MOBI_USER_AGENT_IGNORE_LIST and add the item to the list.\n \nMOBI_USER_AGENT_IGNORE_LIST = ['ipad',]\n\nIf you want to distinguish tablet devices from phones, then set MOBI_DETECT_TABLET = True and use request.tablet attribute\n\n{% if not request.mobile or request.tablet %}\n\t

This section enabled only for descktop and tablets

\n{% endif %}\n\n\n\n\nUsing the mobi.MobileRedirectMiddleware Middleware\n---------------------------------------------------\nThis middleware will scan all incoming requests to see if it is a mobile device, if so it will redirect the request to a different URL. This is good if you want to force all mobile traffic to a mobile only version of your site.\n\nTo use all you have to do is add mobi.MobileRedirectMiddleware to your MIDDLEWARE_CLASSES tuple in your settings.py, and also add MOBI_REDIRECT_URL = \"http://example.mobi\" where http://example.mobi is the website you want to redirect all mobile traffic.\n\n\nNot using the Middleware\n------------------------\nIf you only have certain views that need the distinction, you can choose not to search every request you receive. All you need to do is wrap the relevant views like this:\n\nfrom mobi.decorators import detect_mobile\n\n@detect_mobile\ndef my_mobile_view(request):\n if request.mobile:\n #do something with mobile", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/kencochrane/django-mobi/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-mobi", "package_url": "https://pypi.org/project/django-mobi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-mobi/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/kencochrane/django-mobi/" }, "release_url": "https://pypi.org/project/django-mobi/0.1.7/", "requires_dist": null, "requires_python": null, "summary": "Django middleware and view decorator to detect phones and small-screen devices", "version": "0.1.7" }, "last_serial": 921876, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "00fdda874aafa634879ecd14a9cdcaab", "sha256": "f0141a952e626e1d318bc72669d88abb75e0ac5e31a5fb27e1e9253af8118ce0" }, "downloads": -1, "filename": "django-mobi-0.1.tar.gz", "has_sig": false, "md5_digest": "00fdda874aafa634879ecd14a9cdcaab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3187, "upload_time": "2011-09-29T17:15:39", "url": "https://files.pythonhosted.org/packages/fe/a7/11758c6a658a9aaeae7ca95479106c8f28ff0524be0f6eb5bd1d5152263e/django-mobi-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "19bb1f7a24b7f8647e76f3c0a3eb521e", "sha256": "f0191fbe1b643cc95b2889a6b3e3c69e8984745ea7e5d300f2160c83c09f3a6e" }, "downloads": -1, "filename": "django-mobi-0.1.1.tar.gz", "has_sig": false, "md5_digest": "19bb1f7a24b7f8647e76f3c0a3eb521e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4923, "upload_time": "2011-09-30T13:51:32", "url": "https://files.pythonhosted.org/packages/d6/b5/01cd9e1489df3cd8d7d429678264c700d0f434c9ffeb34e1989750b09b75/django-mobi-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "31cfca528cc06bbe37dd1793d2b571bc", "sha256": "5e318691c297a4f19d5f6649fb10f1bf7b6e8c40028d0a6aea6a0d013a18f7eb" }, "downloads": -1, "filename": "django-mobi-0.1.2.tar.gz", "has_sig": false, "md5_digest": "31cfca528cc06bbe37dd1793d2b571bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5089, "upload_time": "2011-09-30T14:36:50", "url": "https://files.pythonhosted.org/packages/bc/83/192c8f5bc0299128153760fce65b9f356a1968a0dcb2f329fb0de7e5671e/django-mobi-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "e40d21d33634e45e058da4a754e52184", "sha256": "b79c067c1df08e8d6cce6372d95203e188164535d4f7fc388a70c0f3d09914bf" }, "downloads": -1, "filename": "django-mobi-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e40d21d33634e45e058da4a754e52184", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5117, "upload_time": "2011-09-30T15:19:52", "url": "https://files.pythonhosted.org/packages/a2/fd/6a445ca70cba26cd2fe5d2d75989d6921a0b1103b59f240d8df05584ddc2/django-mobi-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "adf9cebbc9fbaa3d4f3470d1e1bd12ea", "sha256": "c1f9bc761f2fc5fa0ce2b713a3c29af6eb836f80f771d1af481365f28e3c40e6" }, "downloads": -1, "filename": "django-mobi-0.1.4.tar.gz", "has_sig": false, "md5_digest": "adf9cebbc9fbaa3d4f3470d1e1bd12ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5177, "upload_time": "2011-09-30T17:53:01", "url": "https://files.pythonhosted.org/packages/39/cc/4da2180450f1b76f3317a57aa45e227e7b3f805715d30b66b0dde560fce5/django-mobi-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "a0ce22d3da9868e9427f27734627b599", "sha256": "a0e7af34d3b81ce651da23eb406d7e36225015cf5a5d34dd5b222ed03920cc98" }, "downloads": -1, "filename": "django-mobi-0.1.5.tar.gz", "has_sig": false, "md5_digest": "a0ce22d3da9868e9427f27734627b599", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5151, "upload_time": "2011-09-30T18:01:53", "url": "https://files.pythonhosted.org/packages/9c/7b/da4381bf730f2a13cb214afcede8963e9052b06d90e4b771ae3747ad8c8a/django-mobi-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "9846137c3d222d6045dd6c970b66bf69", "sha256": "792eded505df63a5d66d8ed2464de400c3a397055270ead5a3e0923dbd189bb8" }, "downloads": -1, "filename": "django-mobi-0.1.6.tar.gz", "has_sig": false, "md5_digest": "9846137c3d222d6045dd6c970b66bf69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5608, "upload_time": "2011-11-12T22:04:59", "url": "https://files.pythonhosted.org/packages/26/a4/2c0d2ef742f1d6c78c65ee07e7982861f862accef4149010c247b0f1cee5/django-mobi-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "1a0223bd5f0154983f077c37f0603838", "sha256": "2d816c4a09045d6546a954482fe36922f4d935aa9b848865109b1a858e29f437" }, "downloads": -1, "filename": "django-mobi-0.1.7.tar.gz", "has_sig": false, "md5_digest": "1a0223bd5f0154983f077c37f0603838", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5809, "upload_time": "2013-11-17T15:30:37", "url": "https://files.pythonhosted.org/packages/a2/84/53bd7291b5775b6007e3f138aeffecb5d685830e478223d4517179dc827d/django-mobi-0.1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1a0223bd5f0154983f077c37f0603838", "sha256": "2d816c4a09045d6546a954482fe36922f4d935aa9b848865109b1a858e29f437" }, "downloads": -1, "filename": "django-mobi-0.1.7.tar.gz", "has_sig": false, "md5_digest": "1a0223bd5f0154983f077c37f0603838", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5809, "upload_time": "2013-11-17T15:30:37", "url": "https://files.pythonhosted.org/packages/a2/84/53bd7291b5775b6007e3f138aeffecb5d685830e478223d4517179dc827d/django-mobi-0.1.7.tar.gz" } ] }