New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

django-mobile-detect

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-mobile-detect

Device browser detection in Django

  • 0.1
  • PyPI
  • Socket score

Maintainers
1

Django Mobile Detector

Mobile Detect is a lightweight Python package for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.

PHP

this package development based from php big repository Mobile-Detect <https://github.com/serbanghita/mobile-detect>_

.. image:: http://demo.mobiledetect.net/logo-github.png

Installation

  1. Python package install::

    pip install django-mobile-detect

  2. Add mobiledetect to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [ ... 'mobiledetect', ]

  3. Middleware::

    MIDDLEWARE_CLASSES = ( '...', 'mobiledetect.middleware.DetectMiddleware', '...' )

View Usage

You can use in views

Check if the device is mobile.

::

request.device.is_mobile

|

Check if the device is a tablet.

::

request.device.is_tablet

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc