Don't import models module, use the far far far far far inferior pattern that @valberg recommends 😛

This commit is contained in:
Benjamin Bach 2024-08-01 00:43:09 +02:00
parent fa6a5cdb86
commit f2fb72a2fe
No known key found for this signature in database
GPG key ID: 486F0D69C845416E

View file

@ -2,24 +2,27 @@
from django.contrib import admin
from . import models
from .models import Membership
from .models import MembershipType
from .models import SubscriptionPeriod
from .models import WaitingListEntry
@admin.register(models.Membership)
@admin.register(Membership)
class MembershipAdmin(admin.ModelAdmin):
"""Admin for Membership model."""
@admin.register(models.MembershipType)
@admin.register(MembershipType)
class MembershipTypeAdmin(admin.ModelAdmin):
"""Admin for MembershipType model."""
@admin.register(models.SubscriptionPeriod)
@admin.register(SubscriptionPeriod)
class SubscriptionPeriodAdmin(admin.ModelAdmin):
"""Admin for SubscriptionPeriod model."""
@admin.register(models.WaitingListEntry)
@admin.register(WaitingListEntry)
class WaitingListEntryAdmin(admin.ModelAdmin):
"""Admin for WaitingList model."""