{ "info": { "author": "Diogo Laginha", "author_email": "diogo.laginha.machado@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2" ], "description": "=====================================\r\nDjango Mobileesp\r\n=====================================\r\n\r\n\r\nBasic usage \r\n-----------\r\n\r\n\r\n*settings.py*\r\n\r\n::\r\n\r\n MIDDLEWARE_CLASSES = (\r\n ...\r\n 'django_mobileesp.middleware.UserAgentDetectionMiddleware'\r\n )\r\n\r\n from django_mobileesp.detector import mobileesp_agent as agent\r\n\r\n DETECT_USER_AGENTS = {\r\n 'is_android': agent.detectAndroid,\r\n 'is_ios': agent.detectIos,\r\n 'is_windows_phone': agent.detectWindowsPhone,\r\n 'is_mobile': agent.detectTierTablet | \\\r\n agent.detectTierIphone | \\\r\n agent.detectMobileQuick,\r\n }\r\n\r\n\r\nIf you prefer more pythonic methods, you can user a wrapper agent as follows:\r\n\r\n::\r\n\r\n from django_mobileesp.detector import python_agent as agent\r\n\r\n DETECT_USER_AGENTS = {\r\n 'is_android': agent.detect_android,\r\n 'is_ios': agent.detect_ios,\r\n 'is_windows_phone': agent.detect_windows_phone,\r\n 'is_mobile': agent.detect_tier_tablet | \\\r\n agent.detect_tier_iphone | \\\r\n agent.detect_mobile_quick,\r\n }\r\n\r\n\r\nFinally access the defined attributes in your views:\r\n\r\n::\r\n\r\n def view(request):\r\n if request.is_mobile:\r\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/laginha/django-mobileesp", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-mobileesp", "package_url": "https://pypi.org/project/django-mobileesp/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-mobileesp/", "project_urls": { "Homepage": "https://github.com/laginha/django-mobileesp" }, "release_url": "https://pypi.org/project/django-mobileesp/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Detect request's mobile user agents using the mobileesp lib.", "version": "1.0.1" }, "last_serial": 1569238, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "200ea774303b4577641c23c383834621", "sha256": "97b34a2ebb92c384b93c23804117b594d0311b773723462430839057dabd95cb" }, "downloads": -1, "filename": "Django_Mobileesp-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "200ea774303b4577641c23c383834621", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11323, "upload_time": "2015-03-10T11:43:54", "url": "https://files.pythonhosted.org/packages/fa/d7/c7eeae30d5cebe452e6938af25c943aec3ae046574c8ba1f6a7c7e713108/Django_Mobileesp-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f791dde6d9eb01776c8f8e05afd55883", "sha256": "675bd20c23e52ce947f284a0d6d44e0bd2b4953d7c10087c55d19a1e053cc13d" }, "downloads": -1, "filename": "Django-Mobileesp-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f791dde6d9eb01776c8f8e05afd55883", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9666, "upload_time": "2015-03-10T11:43:50", "url": "https://files.pythonhosted.org/packages/b8/3f/e5b0a4530cc4fc2a2b766c05ce9acf1cffcc2720241cbf1b3bf6fa7e01b3/Django-Mobileesp-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "fb78d376ff422d8f823115aedaf8ebeb", "sha256": "6c93667a30c5f81f8a2cae97083498ab50d342392c061aa445a2d7fedd4f5a4f" }, "downloads": -1, "filename": "Django_Mobileesp-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "fb78d376ff422d8f823115aedaf8ebeb", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 12241, "upload_time": "2015-05-30T17:07:50", "url": "https://files.pythonhosted.org/packages/e9/a9/d05dd31d31a8705b741fd37adf9fce7444d1d9eeb1ebf79e12e1ef611c44/Django_Mobileesp-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "028a9103f74df98f556687ffa79d8ef5", "sha256": "ec7b5d1332a8b73942c8be946bb75c1a857810dcef0a3f9e366d499c0df55ea4" }, "downloads": -1, "filename": "Django-Mobileesp-1.0.1.tar.gz", "has_sig": false, "md5_digest": "028a9103f74df98f556687ffa79d8ef5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10540, "upload_time": "2015-05-30T17:07:46", "url": "https://files.pythonhosted.org/packages/ed/96/81bcea5ef735687e43a11ba8e5bcaa430ad2c8f86b46cab4fbd3d747ca27/Django-Mobileesp-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fb78d376ff422d8f823115aedaf8ebeb", "sha256": "6c93667a30c5f81f8a2cae97083498ab50d342392c061aa445a2d7fedd4f5a4f" }, "downloads": -1, "filename": "Django_Mobileesp-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "fb78d376ff422d8f823115aedaf8ebeb", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 12241, "upload_time": "2015-05-30T17:07:50", "url": "https://files.pythonhosted.org/packages/e9/a9/d05dd31d31a8705b741fd37adf9fce7444d1d9eeb1ebf79e12e1ef611c44/Django_Mobileesp-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "028a9103f74df98f556687ffa79d8ef5", "sha256": "ec7b5d1332a8b73942c8be946bb75c1a857810dcef0a3f9e366d499c0df55ea4" }, "downloads": -1, "filename": "Django-Mobileesp-1.0.1.tar.gz", "has_sig": false, "md5_digest": "028a9103f74df98f556687ffa79d8ef5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10540, "upload_time": "2015-05-30T17:07:46", "url": "https://files.pythonhosted.org/packages/ed/96/81bcea5ef735687e43a11ba8e5bcaa430ad2c8f86b46cab4fbd3d747ca27/Django-Mobileesp-1.0.1.tar.gz" } ] }