Code Monkey home page Code Monkey logo

django-badbrowser's Introduction

django-badbrowser readme

Installation

To install django-badbrowser:

  1. Install with easy_install/pip/whatever
  2. Add badbrowser.middleware.BrowserSupportDetection to the MIDDLEWARE_CLASSES setting
  3. Add badbrowser to your INSTALLED_APPS setting
  4. Specify the BADBROWSER_REQUIREMENTS setting (see below for details and additional settings)
  5. Copy/sym-link the badbrowser/media/django-badbrowser/ directory into your media directory

Config options

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:

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
)

BADBROWSER_SUGGEST

A list of browsers to suggest to the user on the “Unsupported web browser” page.

Example:

BADBROWSER_SUGGEST = ("firefox", "chrome", "safari", "opera", "microsoft internet explorer")

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:

BADBROWSER_BASE_TEMPLATE = "myapp/base.html"

django-badbrowser's People

Contributors

ionelmc avatar

Watchers

James Cloos avatar sinyawskiy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.