Skip to main content

Django UserAgent Detect

Project description

Installation

pip install django-detect

Usage

# ####### Device、OS #######
# Windows
request.Windows
# Linux
request.Linux
# iMac/iPhone/iPad/iPod
request.iMac
request.iPhone
request.iPad
request.iPod
# PC
request.PC = request.Windows or request.Linux or request.iMac
# iOS
request.iOS = request.iPhone or request.iPad or request.iMac or request.iPod
# Android and Version
request.Android
request.Android.version

# ####### APP #######
# Weixin/Wechat and Version
request.weixin
request.weixin.version
request.wechat
request.wechat.version

Settings.py

# Use `MIDDLEWARE_CLASSES` prior to Django 1.10
MIDDLEWARE = (
    ...
    'detect.middleware.UserAgentDetectionMiddleware',
    ...
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-detect-1.0.7.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

django_detect-1.0.7-py2.py3-none-any.whl (3.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-detect-1.0.7.tar.gz.

File metadata

  • Download URL: django-detect-1.0.7.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.12+

File hashes

Hashes for django-detect-1.0.7.tar.gz
Algorithm Hash digest
SHA256 374a0fc8d4671ba924ea6ffc11e814ac015abc3ec41772bf7956982a1c9fced6
MD5 fd800bd9e40ab55045c05c9e1c4e952b
BLAKE2b-256 7c7856900ef010a13d5eec68c0f0f665a41cbd461d51daa7be9406b6f9db261b

See more details on using hashes here.

File details

Details for the file django_detect-1.0.7-py2.py3-none-any.whl.

File metadata

  • Download URL: django_detect-1.0.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.12+

File hashes

Hashes for django_detect-1.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6b9eab2f9ddc2b77595eeef335102d0da8bbd8fac2a6a262108a8ae1b8f62d41
MD5 65f503cbdcb542ddb7a954bbc7b40a9a
BLAKE2b-256 d49e405c67bcede09ee71bd8f8c41b94632a0ca70a4cfce8dfa4c4eefbd6eb39

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page