Features

Highly customizable: you can pass a regular expression to filter a set of urls.

Simple: you can select a view to disable ou re-enable.

You can define to which view you want to redirect the user.

Rules are cached to improve the performance.

Example of Usage

INSTALLED_APPS=('django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.admin','intruder',)MIDDLEWARE_CLASSES=('django.contrib.sessions.middleware.SessionMiddleware','django.contrib.auth.middleware.AuthenticationMiddleware',# required'intruder.middleware.IntruderMiddleware',)# Optional, you can define this to create a list of default views you want to redirect:INTRUDER_DEFAULT_REDIRECT_VIEWS=(('','-----'),('intruder.views.feature_under_maintenance','Feature under maintenance'),('intruder.views.feature_is_no_longer_available','Feature is no longer available'))

Access: http://YOUR_DOMAIN/admin/intruder/

Information about the logic of the library

If a redirect view no longer exist, the rule will be ignored.

If any error occur in the middleware, it will be ignored and the original view will be processed normally.