bgneal@918: from django.apps import AppConfig bgneal@918: import django.contrib.auth.views bgneal@918: bgneal@918: from antispam.decorators import log_auth_failures bgneal@918: bgneal@918: bgneal@918: class AntiSpamConfig(AppConfig): bgneal@918: name = 'antispam' bgneal@918: verbose_name = 'Anti-Spam' bgneal@918: bgneal@918: def ready(self): bgneal@918: import antispam.receivers bgneal@918: bgneal@918: # Install rate limiting on auth login bgneal@918: django.contrib.auth.views.login = log_auth_failures('Login')( bgneal@918: django.contrib.auth.views.login)