from django.contrib import admin

from .models import WhitelistedUsername


class WhitelistedUsernameAdmin(admin.ModelAdmin):
    pass


admin.site.register(WhitelistedUsername, WhitelistedUsernameAdmin)

from django.contrib import admin

from .models import WhitelistedUsername


@admin.register(WhitelistedUsername)
class WhitelistedUsernameAdmin(admin.ModelAdmin):
    pass

Use class decorator instead of floating statement to register WhitelistedUsernameAdmin class.
Use class decorator instead of floating statement to register WhitelistedUsernameAdmin class.
