Skip to main content
================
Mobility Helpers
================

Version : 0.3
Author : Thomas Weholt <thomas@weholt.org>
License : Modified BSD
WWW : https://bitbucket.org/weholt/django-mobilityhelpers
Status : Beta - Experimental.


About
-----
Mobility Helpers are a small reusable django app making it easier to target mobile platforms/devices. It comes as a piece of middleware
and a helper function to render a view.

In short using a special function to render your views will detect requests from mobile devices and look for a special template for that devices. Normal clients
will get a normal template. So if you access a page with your tablet the app will use templatename.mobile.html to render the view instead of templatename.html.


Installtion
-----------
* pip install django-mobilityhelpers
* add 'mobilityhelpers.middleware.MobileDetectionMiddleware' to your middleware section in settings.py
* in your views do a 'from mobilityhelpers import smart_response'

Usage
-----

* After installation your should have a 'is_mobile' property on your request instances. You can use this to tune your queryset etc. for mobile devices.
* Instead of using render_to_response use smart_response(request, template_name, context_data).


Configuration options
---------------------
* You can settings.DISABLE_MOBILITY_HELPERS = False to disable rendering of templates aimed at mobile devices.
* settings.DETECT_MOBILE_FLAVOUR = True will add a specific tag to the template being rendered, ie. for ipad ( the only supported device so far ) will
render index.ipad.html instead of index.mobile.html when accessed with an iPad. All other supported mobile devices will use index.mobile.html.


Changelog
---------

0.3.0 - Django 2.0 support

0.2.0 - Python 3.x support.

0.1.0 - Initial release.


Requirements
------------
* django


Credits
-------
* http://djangosnippets.org/snippets/2001/

Metadata

Release files for Django-MobilityHelpers 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Django-MobilityHelpers 0.3.0
File Size Uploaded Provenance Actions
Django-MobilityHelpers-0.3.0.tar.gz 3.6 kB Without provenance Details for Django-MobilityHelpers-0.3.0.tar.gz

Release files / Django-MobilityHelpers-0.3.0.tar.gz

Download URL Django-MobilityHelpers-0.3.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3ea03140dcda789522da889f1aa6f32d315247858d160fabb5a25082a13e6509
BLAKE2b-256 checksum
How to use checksums
b3c4becc0da3d096cf4245b63ac577e97cb4dc1c3991ffc608e33609aea73029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Django-MobilityHelpers 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page