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.9.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

django_detect-1.0.9-py2.py3-none-any.whl (3.1 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: django-detect-1.0.9.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.10

File hashes

Hashes for django-detect-1.0.9.tar.gz
Algorithm Hash digest
SHA256 4ab9c49447530c8b01799d7586f4914443f2c5df97de58f8fc2d0cf8265020ea
MD5 0ed58db1d7947726146cf75ce616a14e
BLAKE2b-256 64dbbc618d3b0fadbd394d753a7e1309a326338b92d175671477f69eaacbdd21

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_detect-1.0.9-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.10

File hashes

Hashes for django_detect-1.0.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eda1c3a114205dad5a9cf1220e2be63c21f63c0440b7df4ad5233969e30e86d7
MD5 f74176005ccf7d39e3a5fdb9535b531b
BLAKE2b-256 3e370889fac5f91a2e03e13a6f1b3ca3f2c4949e0c5e0dc9dcf74a05c766e8ff

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