Hi Guys,
I'm building a site for the local cub scouts using Pinax. Does anyone have any suggestions as to how we can moderate photos before they are uploaded?
Hi Guys,
I'm building a site for the local cub scouts using Pinax. Does anyone have any suggestions as to how we can moderate photos before they are uploaded?
If you mean you only want to display approved photos then django-gatekeeper is a good option. You simply register the Image
model
gatekeeper.register(Image)
and it will add a generic relationship which includes various moderation fields. The main one being the moderation_status
one which can be
By default when a new Image
is created it will be set to pending status and visible for approval in the moderation queue view that is included.
When you want to display the approved images, instead of simply Image.objects.all()
, gatekeeper adds a few extra methods to access objects with the various statuses. So to access the approved, pending, and rejected objects you would use respectively.
Image.objects.all().approved()
Image.objects.all().pending()
Image.objects.all().rejected()
I haven't tested pinax out but I've dropped gatekeeper into my own sites without changing the apps it was being used in and without any problems.