mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-12 09:33:12 +00:00
Clean up and unify imports
- Use consistent alphabetical import ordering across files - Use axes.conf.settings for internally loading settings Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
This commit is contained in:
parent
0b6d84762a
commit
19f84c5daa
5 changed files with 8 additions and 9 deletions
|
|
@ -1,8 +1,7 @@
|
|||
from django.contrib import admin
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from axes.models import AccessLog
|
||||
from axes.models import AccessAttempt
|
||||
from axes.models import AccessAttempt, AccessLog
|
||||
|
||||
|
||||
@admin.register(AccessAttempt)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from django.core.checks import Error, Tags, register
|
||||
|
||||
from django.conf import settings
|
||||
from axes.conf import settings
|
||||
|
||||
|
||||
class Messages:
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ import logging
|
|||
|
||||
from django.utils.timezone import now
|
||||
|
||||
from axes.conf import settings
|
||||
from axes.attempts import get_cache_key
|
||||
from axes.attempts import get_cache_timeout
|
||||
from axes.attempts import get_user_attempts
|
||||
from axes.attempts import is_user_lockable
|
||||
from axes.attempts import ip_in_whitelist
|
||||
from axes.attempts import reset_user_attempts
|
||||
from axes.conf import settings
|
||||
from axes.exceptions import AxesSignalPermissionDenied
|
||||
from axes.models import AccessLog, AccessAttempt
|
||||
from axes.signals import user_locked_out
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@ import string
|
|||
import time
|
||||
from unittest.mock import patch
|
||||
|
||||
from django.http import HttpRequest
|
||||
from django.test import TestCase, override_settings
|
||||
from django.urls import reverse
|
||||
from django.contrib.auth import authenticate
|
||||
from django.contrib.auth.models import User
|
||||
from django.http import HttpRequest
|
||||
from django.test import TestCase, override_settings
|
||||
from django.test.client import RequestFactory
|
||||
from django.urls import reverse
|
||||
|
||||
from axes.conf import settings
|
||||
from axes.attempts import get_cache_key
|
||||
from axes.conf import settings
|
||||
from axes.models import AccessAttempt, AccessLog
|
||||
from axes.signals import user_locked_out
|
||||
from axes.utils import reset
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
from django.core.checks import run_checks, Error
|
||||
from django.conf import settings
|
||||
from django.test import TestCase, override_settings
|
||||
|
||||
from axes.checks import Messages, Hints, Codes
|
||||
from axes.conf import settings
|
||||
|
||||
|
||||
class CacheCheckTestCase(TestCase):
|
||||
|
|
|
|||
Loading…
Reference in a new issue