Browser detection (including browser upgrade notices) for Django
Project description
h1. django-badbrowser readme
h2. Installation
To install django-badbrowser:
# Install with easy_install/pip/whatever
# Add @django_badbrowser.middleware.BrowserSupportDetection@ to the @MIDDLEWARE_CLASSES@ setting
# Add @django_badbrowser@ to your @INSTALLED_APPS@ setting
# Specify the @BADBROWSER_REQUIREMENTS@ setting (see below for details and additional settings)
# Copy/sym-link the @django_badbrowser/media/django-badbrowser/@ directory into your media directory
h2. Config options
h3. BADBROWSER_REQUIREMENTS
A list of any specific browser restrictions. Browsers listed here with versions lower than the specified version numbers will be shown the "Unsupported web browser" message. Any browsers not listed here will be free to access the site as normal, as will any clients which do not specify a user agent.
Example:
<pre>BADBROWSER_REQUIREMENTS = (
("firefox", "3.0"),
("chrome", "3.0"),
("microsoft internet explorer", "8"),
("opera", None), # None indicates no support for the given browser, whatever the version
)</pre>
h3. BADBROWSER_SUGGEST
A list of browsers to suggest to the user on the "Unsupported web browser" page.
Example:
<pre>BADBROWSER_SUGGEST = ("firefox", "chrome", "safari", "opera", "microsoft internet explorer")</pre>
h3. BADBROWSER_BASE_TEMPLATE
The base template which should be extended in the rendering of the "Unsupported web browser" page. This page will probably need to have blocks for "extra_head" (within the head tag) and "content" (within the body tag)
Example:
<pre>BADBROWSER_BASE_TEMPLATE = "myapp/base.html"</pre>
h2. Installation
To install django-badbrowser:
# Install with easy_install/pip/whatever
# Add @django_badbrowser.middleware.BrowserSupportDetection@ to the @MIDDLEWARE_CLASSES@ setting
# Add @django_badbrowser@ to your @INSTALLED_APPS@ setting
# Specify the @BADBROWSER_REQUIREMENTS@ setting (see below for details and additional settings)
# Copy/sym-link the @django_badbrowser/media/django-badbrowser/@ directory into your media directory
h2. Config options
h3. BADBROWSER_REQUIREMENTS
A list of any specific browser restrictions. Browsers listed here with versions lower than the specified version numbers will be shown the "Unsupported web browser" message. Any browsers not listed here will be free to access the site as normal, as will any clients which do not specify a user agent.
Example:
<pre>BADBROWSER_REQUIREMENTS = (
("firefox", "3.0"),
("chrome", "3.0"),
("microsoft internet explorer", "8"),
("opera", None), # None indicates no support for the given browser, whatever the version
)</pre>
h3. BADBROWSER_SUGGEST
A list of browsers to suggest to the user on the "Unsupported web browser" page.
Example:
<pre>BADBROWSER_SUGGEST = ("firefox", "chrome", "safari", "opera", "microsoft internet explorer")</pre>
h3. BADBROWSER_BASE_TEMPLATE
The base template which should be extended in the rendering of the "Unsupported web browser" page. This page will probably need to have blocks for "extra_head" (within the head tag) and "content" (within the body tag)
Example:
<pre>BADBROWSER_BASE_TEMPLATE = "myapp/base.html"</pre>
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
File details
Details for the file django-badbrowser-1.0.2.tar.gz
.
File metadata
- Download URL: django-badbrowser-1.0.2.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a62357fb7a138dddd2c9a34524a3c475d5ed3b911e82bb64e04c85f1fc6389a |
|
MD5 | 74516593b6bbb6be229b73bc3894e1d5 |
|
BLAKE2b-256 | 43a9d0e5f7ce27584d78e1824b156fe04d81a3d52edc80bc00d6139a1250c461 |