annotate antispam/apps.py @ 1208:5c8a38122e24 modernize tip

Add unit test for POTD tasks.
author Brian Neal <bgneal@gmail.com>
date Tue, 28 Jan 2025 19:02:18 -0600
parents 02181fa5ac9d
children
rev   line source
bgneal@918 1 from django.apps import AppConfig
bgneal@918 2
bgneal@918 3
bgneal@918 4 class AntiSpamConfig(AppConfig):
bgneal@918 5 name = 'antispam'
bgneal@918 6 verbose_name = 'Anti-Spam'
bgneal@918 7
bgneal@918 8 def ready(self):
bgneal@918 9 import antispam.receivers
bgneal@1206 10 from antispam.decorators import log_auth_failures
bgneal@1206 11 import django.contrib.auth.views
bgneal@918 12
bgneal@918 13 # Install rate limiting on auth login
bgneal@918 14 django.contrib.auth.views.login = log_auth_failures('Login')(
bgneal@918 15 django.contrib.auth.views.login)