django-machina
django-machina copied to clipboard
Add a way to prevent users to submit too many posts in a given period
Should we add a way to prevent users to submit too many posts in a given period?
It would certainly be helpful against spamming and (unintended) repetitive submission.
Probably, this could be achieved by having CAPTCHA checked during Post/Topic creation.
ping @ellmetha Perhaps just adding a reCAPTCHA field? I haven't taken a look at the forms (since I'm just taking a look at this); is there a way we can customize the form for submitting a post?
In general, if there's a created attribute in the "posts" model, then it's possible to do a simple query and allow for it.
I have done this with
@receiver(post_save, sender=Post)
def identify_spam(sender, instance, **kwargs):
## search database for author activity and post similarity, if suspicious,...
if spam:
instance.delete()