mirror of
https://github.com/jazzband/django-axes.git
synced 2026-03-16 22:30:23 +00:00
AccessAttemptAdmin.list_display datatype change tuple->list for customization
This commit is contained in:
parent
75c29bd6f8
commit
e4e0299252
1 changed files with 10 additions and 18 deletions
|
|
@ -7,25 +7,17 @@ from axes.models import AccessAttempt, AccessLog, AccessFailureLog
|
|||
|
||||
|
||||
class AccessAttemptAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
"attempt_time",
|
||||
"ip_address",
|
||||
"user_agent",
|
||||
"username",
|
||||
"path_info",
|
||||
"failures_since_start",
|
||||
]
|
||||
|
||||
if settings.AXES_USE_ATTEMPT_EXPIRATION:
|
||||
list_display = (
|
||||
"attempt_time",
|
||||
"expiration",
|
||||
"ip_address",
|
||||
"user_agent",
|
||||
"username",
|
||||
"path_info",
|
||||
"failures_since_start",
|
||||
)
|
||||
else:
|
||||
list_display = (
|
||||
"attempt_time",
|
||||
"ip_address",
|
||||
"user_agent",
|
||||
"username",
|
||||
"path_info",
|
||||
"failures_since_start",
|
||||
)
|
||||
list_display.append('expiration')
|
||||
|
||||
list_filter = ["attempt_time", "path_info"]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue