mirror of
https://github.com/jazzband/django-axes.git
synced 2026-03-16 22:30:23 +00:00
Modified verbiage changes & removed comment
This commit is contained in:
parent
74c24c0e78
commit
f583e93718
1 changed files with 5 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ class AccessAttemptAdmin(admin.ModelAdmin):
|
|||
if settings.AXES_USE_ATTEMPT_EXPIRATION:
|
||||
list_display = (
|
||||
"attempt_time",
|
||||
"expires_at",
|
||||
"expiration",
|
||||
"ip_address",
|
||||
"user_agent",
|
||||
"username",
|
||||
|
|
@ -34,7 +34,7 @@ class AccessAttemptAdmin(admin.ModelAdmin):
|
|||
date_hierarchy = "attempt_time"
|
||||
|
||||
fieldsets = (
|
||||
(None, {"fields": ("username", "path_info", "failures_since_start", "expires_at")}),
|
||||
(None, {"fields": ("username", "path_info", "failures_since_start", "expiration")}),
|
||||
(_("Form Data"), {"fields": ("get_data", "post_data")}),
|
||||
(_("Meta Data"), {"fields": ("user_agent", "ip_address", "http_accept")}),
|
||||
)
|
||||
|
|
@ -49,15 +49,15 @@ class AccessAttemptAdmin(admin.ModelAdmin):
|
|||
"get_data",
|
||||
"post_data",
|
||||
"failures_since_start",
|
||||
"expires_at",
|
||||
"expiration",
|
||||
]
|
||||
|
||||
def has_add_permission(self, request: HttpRequest) -> bool:
|
||||
return False
|
||||
|
||||
def expires_at(self, obj: AccessAttempt):
|
||||
def expiration(self, obj: AccessAttempt):
|
||||
if hasattr(obj, "expiration") and obj.expiration.expires_at:
|
||||
return obj.expiration.expires_at #.strftime("%Y-%m-%d %H:%M:%S")
|
||||
return obj.expiration.expires_at
|
||||
return _("Not set")
|
||||
|
||||
class AccessLogAdmin(admin.ModelAdmin):
|
||||
|
|
|
|||
Loading…
Reference in a new issue