Closed ursomniac closed 4 years ago
Are you sure you've created moderator.py
, registered the model and ran auto_discover()
in your project level urls.py
?
Yup. I'm looking at the code in the repo here and it doesn't match my local copy. I suspect that I'm a rev behind (I'm using Django 1.7 which is likely relevant since the newest rev deals with 1.7 support).
I've backed out to Django 1.6. It ALMOST works, but it appears that the problem (the original one I posted) is that visible_until_rejected is not being honored. I have this moderator class defined:
class EventModerator(GenericModerator): notify_user = False notify_moderator = False auto_approve_for_superusers = True auto_approve_for_staff = False visible_until_rejected = False
But an Event that is created by a user who is staff-only shows up in the Event table. It DOES also appear in the moderation_moderated table correctly ('pending'). In the User table, the user has permissions "event | event | Can add event" and "event | event | Can change event" set --- is that an error on my part (and if so, what's the correct set of user permissions since if I don't have them set, I get the "You don't have permission to edit anything" error).
Also, if a superuser REJECTS an Event, the Event ALSO still appears in the event_event table.
We have a new version of django-moderation
which does not have such problem.
I'm trying to do a parallel test from the shell to what's in the docs.
As I understand it, this should be unapproved and the follow should NOT happen.
According to the docs, this SHOULD return: Traceback (most recent call last): DoesNotExist: YourModel matching query does not exist.
Also, rejected items likewise also return (e.g., a rejected item has pk=9)
Thoughts? Suggestions?