On Thu, 2006-10-05 at 03:05 +0000, coulix wrote: > Hello, i am using free comments in my app and starting to getting spam > :) > I dont want to use captcha yet and instead, use some content string > scanning method. > (sex, viagra, $$$ and other crap will not post the message). > What is the best way to this ? > exends comments view.py ?
You can do this without needing to touch the Django source, but the effect is the same. Put an explicit entry in your URL configuration to handle the post URL for comments. Then check the content for whatever you like and, if it's fine, just pass off handling to contrib.comments.views.comments.post_free_comment (which is what would normally handle this). If you do catch content you don't like in your initial view, then you might have to replicate some of the logic in post_free_comment (or not). I hooked up something like this for a client recently who wanted to have the possibility of both registered and unregistered comments (and unregistered users saw a captcha challenge). Overriding the URL and putting in a preliminary view worked fairly smoothly in the end. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---