dominno / django-moderation

django-moderation is reusable application for Django framework, that allows to moderate any model objects.
BSD 3-Clause "New" or "Revised" License
269 stars 90 forks source link

I get admin moderation enabled with base ModelAdmin class #159

Open krnr opened 7 years ago

krnr commented 7 years ago

As far as I understood it from the docs admin support must be enabled explicitly. However I still get moderation queue for my admin changes without ModerationAdmin class:

# models.py
class PersonSeason(models.Model):
    ...

# admin.py
@admin.register(PersonSeason)
class PersonSeasonAdmin(admin.ModelAdmin):
    search_fields = ('person__name', 'person__first_name', )
    list_display = ('__str__', 'role', 'team', 'season')
    list_select_related = ('person', 'team', 'season')
    list_filter = (
        ('person__name', DropdownFilter),
        ('year', DropdownFilter),
        ('team__name', DropdownFilter),
    )
    raw_id_fields = ('team', )

# moderator.py
class NoNotifyModerator(GenericModerator):
    notify_moderator = False
    notify_user = False
    admin_integration_enabled = False

class PersonSeasonModerator(NoNotifyModerator):
    pass

moderation.register(PersonSeason, PersonSeasonModerator)

what did I get wrong?