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

Moderated objects unavailable even with visible_until_rejected = True #188

Open
djjudas21 opened this issue Feb 19, 2020 · 1 comment
Open

Comments

@djjudas21
Copy link

I've set up moderation on my new site, but I've found that even when I set visible_until_rejected = True new objects are still held in the moderation queue and are unavailable until they have been moderated.

Related issue on my project camerahub/camerahub#202

# moderator.py

from moderation import moderation
from moderation.moderator import GenericModerator

from schema.models import Manufacturer, Battery, FlashProtocol, NegativeSize, Format, Mount, PaperStock, Process, Toner, FilmStock, Developer, LensModel, CameraModel

# Define custom moderation settings
class CustomModerator(GenericModerator):
    visible_until_rejected = True
    keep_history = False

# Enable moderation on models
moderation.register(Manufacturer, CustomModerator)
moderation.register(Battery, CustomModerator)
moderation.register(FlashProtocol, CustomModerator)
moderation.register(NegativeSize, CustomModerator)
moderation.register(Format, CustomModerator)
moderation.register(Mount, CustomModerator)
moderation.register(PaperStock, CustomModerator)
moderation.register(Process, CustomModerator)
moderation.register(Toner, CustomModerator)
moderation.register(FilmStock, CustomModerator)
moderation.register(Developer, CustomModerator)
moderation.register(LensModel, CustomModerator)
moderation.register(CameraModel, CustomModerator)

Screenshots

Entering a new object as a non-staff user

Screenshot from 2020-02-19 21-35-52

Error message because the object is not yet visible

Screenshot from 2020-02-19 21-36-00

New object in pending state but not visible

Screenshot from 2020-02-19 21-36-13

@djjudas21
Copy link
Author

Hi there, any updates on this? Thanks

dipen30 added a commit to dipen30/django-moderation that referenced this issue Oct 12, 2021
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