# Path: django_sonic_screwdriver/admin.py
# class BaseModelAdmin(admin.ModelAdmin):
#     """
#     Base Model Admin
#     Describes the default values of nearly every Model.
# 
#     Note: Model must inherit BaseGameModel!
#     """
# 
#     fieldsets = ((_("Created and Updated"), {"fields": ("created_at", "updated_at")}),)
#     readonly_fields = ("created_at", "updated_at")
#     list_display = ("__str__", "created_at", "updated_at")
# 
#     def get_ordering(self, request):
#         return ["-created_at"]
# 
# Path: django_sonic_screwdriver/apps/ban/models.py
# class UserBan(Ban):
#     banned_user = models.ForeignKey(
#         settings.AUTH_USER_MODEL,
#         on_delete=models.CASCADE,
#         verbose_name=_("User"),
#         related_name="banned_user",
#         blank=False,
#         null=True,
#         help_text="This is the banned user or the receiver of the ban.",
#     )
# 
#     class Meta:
#         verbose_name = _("User Ban")
#         verbose_name_plural = _("User Bans")
# 
#     def __str__(self):
#         return self.banned_user.get_username()
# 
# class IPBan(Ban):
#     ip = models.GenericIPAddressField(
#         verbose_name=_("IP"),
#         blank=False,
#         null=True,
#         help_text=_(
#             "This is the banned ip. Every request from this IP will result in 403."
#         ),
#     )
# 
#     class Meta:
#         verbose_name = _("IP Ban")
#         verbose_name_plural = _("IP Bans")
# 
#     def __str__(self):
#         return str(self.ip)


from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from django_sonic_screwdriver.admin import BaseModelAdmin
from .models import UserBan, IPBan




@admin.register(UserBan)
class UserBanAdmin(BaseModelAdmin):  # pragma: no cover
    fieldsets = (
        (_("Ban"), {"fields": ("banned_user", "end_date")}),
    ) + BaseModelAdmin.fieldsets


@admin.register(IPBan)

# Path: django_sonic_screwdriver/admin.py
# class BaseModelAdmin(admin.ModelAdmin):
#     """
#     Base Model Admin
#     Describes the default values of nearly every Model.
# 
#     Note: Model must inherit BaseGameModel!
#     """
# 
#     fieldsets = ((_("Created and Updated"), {"fields": ("created_at", "updated_at")}),)
#     readonly_fields = ("created_at", "updated_at")
#     list_display = ("__str__", "created_at", "updated_at")
# 
#     def get_ordering(self, request):
#         return ["-created_at"]
# 
# Path: django_sonic_screwdriver/apps/ban/models.py
# class UserBan(Ban):
#     banned_user = models.ForeignKey(
#         settings.AUTH_USER_MODEL,
#         on_delete=models.CASCADE,
#         verbose_name=_("User"),
#         related_name="banned_user",
#         blank=False,
#         null=True,
#         help_text="This is the banned user or the receiver of the ban.",
#     )
# 
#     class Meta:
#         verbose_name = _("User Ban")
#         verbose_name_plural = _("User Bans")
# 
#     def __str__(self):
#         return self.banned_user.get_username()
# 
# class IPBan(Ban):
#     ip = models.GenericIPAddressField(
#         verbose_name=_("IP"),
#         blank=False,
#         null=True,
#         help_text=_(
#             "This is the banned ip. Every request from this IP will result in 403."
#         ),
#     )
# 
#     class Meta:
#         verbose_name = _("IP Ban")
#         verbose_name_plural = _("IP Bans")
# 
#     def __str__(self):
#         return str(self.ip)


# Path: django_sonic_screwdriver/apps/ban/admin.py
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from django_sonic_screwdriver.admin import BaseModelAdmin
from .models import UserBan, IPBan





@admin.register(UserBan)
class UserBanAdmin(BaseModelAdmin):  # pragma: no cover
    fieldsets = (
        (_("Ban"), {"fields": ("banned_user", "end_date")}),
    ) + BaseModelAdmin.fieldsets


@admin.register(IPBan)

class IPBanAdmin(BaseModelAdmin):  # pragma: no cover