Mercurial > public > sg101
comparison antispam/apps.py @ 918:886234943aed
Antispam app refactor.
For Django 1.7.7 upgrade.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Mon, 06 Apr 2015 20:14:10 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
917:0365fdbb4d78 | 918:886234943aed |
---|---|
1 from django.apps import AppConfig | |
2 import django.contrib.auth.views | |
3 | |
4 from antispam.decorators import log_auth_failures | |
5 | |
6 | |
7 class AntiSpamConfig(AppConfig): | |
8 name = 'antispam' | |
9 verbose_name = 'Anti-Spam' | |
10 | |
11 def ready(self): | |
12 import antispam.receivers | |
13 | |
14 # Install rate limiting on auth login | |
15 django.contrib.auth.views.login = log_auth_failures('Login')( | |
16 django.contrib.auth.views.login) |