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

Uploaded Source

Built Distribution

django_detect-1.0.18-py2.py3-none-any.whl (3.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: django-detect-1.0.18.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for django-detect-1.0.18.tar.gz
Algorithm Hash digest
SHA256 3ecbb9f6192a656d746191025537b278f7cf5146705283847a214a7607a79b02
MD5 70bf446fdae60c0fad071341dc376acc
BLAKE2b-256 e09a3c0c5c9587e8ede263651e1d9fa583fa7d63651d11b8115d9f01fb9af133

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_detect-1.0.18-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for django_detect-1.0.18-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 168e3b8cc7c7876a4b66d301093f086beec05e1906bdd05d38cacb0d4696b3b1
MD5 1fd8929f9ee84ce3f1a28a275e5474d4
BLAKE2b-256 4a48dbbcdba092e1124b9e9370fc916e61f447a1501daebf31c11a8f8a6a55dd

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