Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get admin moderation enabled with base ModelAdmin class #159

Open
krnr opened this issue Sep 14, 2017 · 0 comments
Open

I get admin moderation enabled with base ModelAdmin class #159

krnr opened this issue Sep 14, 2017 · 0 comments

Comments

@krnr
Copy link

krnr commented Sep 14, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant