# Path: axes/conf.py

# 
# Path: axes/models.py
# class AccessAttempt(AccessBase):
#     get_data = models.TextField(_("GET Data"))
# 
#     post_data = models.TextField(_("POST Data"))
# 
#     failures_since_start = models.PositiveIntegerField(_("Failed Logins"))
# 
#     def __str__(self):
#         return f"Attempted Access: {self.attempt_time}"
# 
#     class Meta:
#         verbose_name = _("access attempt")
#         verbose_name_plural = _("access attempts")
#         unique_together = [["username", "ip_address", "user_agent"]]
# 
# class AccessLog(AccessBase):
#     logout_time = models.DateTimeField(_("Logout Time"), null=True, blank=True)
# 
#     def __str__(self):
#         return f"Access Log for {self.username} @ {self.attempt_time}"
# 
#     class Meta:
#         verbose_name = _("access log")
#         verbose_name_plural = _("access logs")


from django.contrib import admin
from django.utils.translation import gettext_lazy as _
from axes.conf import settings
from axes.models import AccessAttempt, AccessLog

    fieldsets = (
        (None, {"fields": ("path_info", "failures_since_start")}),
        (_("Form Data"), {"fields": ("get_data", "post_data")}),
        (_("Meta Data"), {"fields": ("user_agent", "ip_address", "http_accept")}),
    )

    readonly_fields = [
        "user_agent",
        "ip_address",
        "username",
        "http_accept",
        "path_info",
        "attempt_time",
        "get_data",
        "post_data",
        "failures_since_start",
    ]

    def has_add_permission(self, request):
        return False


class AccessLogAdmin(admin.ModelAdmin):
    list_display = (
        "attempt_time",
        "logout_time",
        "ip_address",
        "username",
        "user_agent",

# Path: axes/conf.py

# 
# Path: axes/models.py
# class AccessAttempt(AccessBase):
#     get_data = models.TextField(_("GET Data"))
# 
#     post_data = models.TextField(_("POST Data"))
# 
#     failures_since_start = models.PositiveIntegerField(_("Failed Logins"))
# 
#     def __str__(self):
#         return f"Attempted Access: {self.attempt_time}"
# 
#     class Meta:
#         verbose_name = _("access attempt")
#         verbose_name_plural = _("access attempts")
#         unique_together = [["username", "ip_address", "user_agent"]]
# 
# class AccessLog(AccessBase):
#     logout_time = models.DateTimeField(_("Logout Time"), null=True, blank=True)
# 
#     def __str__(self):
#         return f"Access Log for {self.username} @ {self.attempt_time}"
# 
#     class Meta:
#         verbose_name = _("access log")
#         verbose_name_plural = _("access logs")


# Path: axes/admin.py
from django.contrib import admin
from django.utils.translation import gettext_lazy as _
from axes.conf import settings
from axes.models import AccessAttempt, AccessLog


    fieldsets = (
        (None, {"fields": ("path_info", "failures_since_start")}),
        (_("Form Data"), {"fields": ("get_data", "post_data")}),
        (_("Meta Data"), {"fields": ("user_agent", "ip_address", "http_accept")}),
    )

    readonly_fields = [
        "user_agent",
        "ip_address",
        "username",
        "http_accept",
        "path_info",
        "attempt_time",
        "get_data",
        "post_data",
        "failures_since_start",
    ]

    def has_add_permission(self, request):
        return False


class AccessLogAdmin(admin.ModelAdmin):
    list_display = (
        "attempt_time",
        "logout_time",
        "ip_address",
        "username",
        "user_agent",

        "path_info",