Skip to content

Use django-contact-form's builtin AkismetContactForm #1559

Open
@bmispelon

Description

@bmispelon

The BaseContactForm in contact/forms.py has a custom clean_body() method that checks the message against the anti-spam service akismet. The docstring on that method seems to indicate that this method was copy/pasted from an old version of django-contact-form because the functionality was removed at some point.

However, it seems the functionality is builtin to the current version of django-contact-form: https://django-contact-form.readthedocs.io/en/latest/forms.html#django_contact_form.forms.AkismetContactForm

So we should be able to remove and simplify our code by using it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests that update Python code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions