Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
119 lines (85 sloc) 3.64 KB

Django Intruder

Continuous Integration Status

Django Intruder is a simple and unobtrusive application to intercept requests. It is useful to enable and disable features, for continuous deployment purpouses.


pip install django-intruder


# Download zip file
# Extract it
# Execute in the extracted directory: python install


pip install django-intruder --upgrade


  • A tool for Feature Flip (a usual practice for Continuous Deployment) must not be intrusive.
  • If you have to add more source code in your project, it increase the chances to include more errors in the application.

Comparison with another fixture tools

  • You do not have to add extra source code in your project for each view or url, like other tools.
  • Completely dynamic: you can enable or disable a feature in the admin interface.
  • List of other similar tools:


  • 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



    'django.contrib.auth.middleware.AuthenticationMiddleware', # required

# Optional, you can define this to create a list of default views you want to redirect:
                  ('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.

Links of Comments

Change Log

Version 0.1.2

  • 2011/10/27 (yyyy/mm/dd)
  • Bugfixes:
  • Removing Permission from admin interface
  • Handling middleware errors

  • Updates:

  • Better layout for default redirect pages

  • New features:

  • INTRUDER_DEFAULT_REDIRECT_VIEWS property in settings
  • New admin interface to facilitate to select redirect view
  • Command in admin interface to clear the Intruder cache

Version 0.1.1

  • 2011/10/12 (yyyy/mm/dd)
  • Ready to use in big projects
  • Changes in the database schema (no migrations, it is just the beginning of this project)
  • Now it do not block the admin interface
  • Bugfixes:
  • Clear cache on object delete
  • Cache problem when we have more than one view_name blank
  • unique=True and null=True was inconsistent for some databases

Version 0.1.0

Jump to Line
Something went wrong with that request. Please try again.