Pinax Django 照片记录 - 适度
我正在使用 Pinax 为当地童子军建立一个网站。有人对我们如何在上传照片之前对其进行审核有任何建议吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您只想显示批准的照片,则 django-gatekeeper 是一个不错的选择。您只需注册
Image
模型,它就会添加一个包含各种审核字段的通用关系。主要的一个是
moderation_status
,它可以被默认情况下,当创建新的
图像
时,它将被设置为待处理状态,并且在审核队列中可见以供批准包含的视图。当您想要显示批准的图像时,Gatekeeper 不只是简单地显示
Image.objects.all()
,而是添加了一些额外的方法来访问具有各种状态的对象。因此,要访问已批准、待处理和已拒绝的对象,您将分别使用。我还没有测试过 pinax,但我已经将网守放入我自己的网站中,而没有更改它正在使用的应用程序,也没有任何问题。
If you mean you only want to display approved photos then django-gatekeeper is a good option. You simply register the
Image
modeland it will add a generic relationship which includes various moderation fields. The main one being the
moderation_status
one which can beBy 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.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.