Skip to main content

Django app that locks out users after too many failed login attempts.

Project description

.. image::

``django-doberman`` Django app that locks out users after too many failed login attempts.

.. image::

.. image::

.. image::

- Python => 2.7
- Django => 1.7


1. You can install the latest stable package running this command:

$ pip install django-doberman

Also you can install the development version running this command::

$ pip install -e git+

2. Add ``doberman`` to ``INSTALLED_APPS`` in your Django settings file





3. ./ migrate doberman || or sync your database


You can contribute to this project forking it from github and sending pull requests.

Running tests

Tests can be run, after you clone the repository and having django installed, like::

PYTHONPATH=$PYTHONPATH:$PWD test doberman --settings=doberman.tests.test_settings


Default: ``10``.

Number of max failed login attempt.

Default: ``600`` (10 minutes).

Number of seconds after the failed login attempts are forgotten in seconds.

'Default': True

Set to False if you are working on localhost or a development environment.

Default: ``300``

Timeout forgotten login attempts of user.

Default: 'username'

Field username form field, change when you are use a diferent "username", for example: 'email'.

Path to alternative lockout template.

Default: 'doberman.FailedAccessAttempt'

Allow to use a custom Model for tracking failed Access Attempts.

Default: (

'HTTP_X_FORWARDED_FOR', # X-Forwarded-For: client, proxy1, proxy2










This used for discovery the real IP, you can change the precedence order.


Add ``doberman.decorators.watch_login`` decorator to your login view. Example::

class LoginView(FormView):
template_name = 'example/login.html'
form_class = AuthenticationForm

def dispatch(self, request, *args, **kwargs):
if request.user.is_authenticated():
return redirect(settings.LOGIN_REDIRECT_URL)
return super(LoginView, self).dispatch(request, *args, **kwargs)

def form_valid(self, form):
user = form.get_user()
login(self.request, user)
return super(LoginView, self).form_valid(form)

def get_success_url(self):
return reverse('logged_in')


Library is by `Hanlle Nicolas Mendoza`.

.. Website:

.. image::
:alt: Bitdeli badge

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

django-doberman-0.5.9.tar.gz (14.1 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page