Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #1559 -- Refactor BaseContactForm to use built-in AkismetContactForm #1584

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ANISH-SR
Copy link

This PR refactors the 'BaseContactForm' in 'contact/forms.py' to utilize the built-in 'AkismetContactForm' from the current version of django-contact-form. This change simplifies our codebase and leverages the maintained functionality provided by the library.

Key changes:

  1. Updated 'BaseContactForm' to inherit from 'AkismetContactForm' instead of 'ContactForm'.
  2. Removed the custom 'clean_body()' method as Akismet spam checking is now handled by the parent class.
  3. Added an 'init' method to properly handle the request object needed for Akismet functionality.
  4. Removed unused imports related to the old implementation.
  5. Maintained all existing custom fields and methods (subject, message, etc.).

Please review and let me know if any further changes or testing are needed.

@ANISH-SR
Copy link
Author

ANISH-SR commented Jul 16, 2024

Hii @bmispelon, just a gentle reminder, if you could review my PR and give me feedback. A feedback would be really helpful and valuable
Thanks for your time!

@ANISH-SR ANISH-SR changed the title Refactor BaseContactForm to use built-in AkismetContactForm Fixed #1559 -- Refactor BaseContactForm to use built-in AkismetContactForm Jul 16, 2024
@bmispelon
Copy link
Member

Hi and thanks for your PR. Please be mindful of other contributors, if you look at the history of the issue, you'll see that it was recently assigned to someone else.

I've enabled the CI checks to run on your PR and I see that the tests are failing, can you look into it? It seems it has something to do with the request not being passed correctly.

Also please be patient with reviews. This project is volunteer run, and a lot of us (well, me anyway) are on summer holidays right now.

@ANISH-SR
Copy link
Author

ANISH-SR commented Jul 17, 2024

Hi @bmispelon, Thank you for your feedback and for running the CI checks. I apologize for the oversight regarding the issue assignment - I'm new to open source contributions and I'll be more careful to check this in future PRs.

I appreciate you taking the time to review my work and provide guidance. I'll look into the failing tests and the issue with passing the 'request' correctly. I'll update the PR once I've made the necessary changes to address these problems.

As a new contributor, I'm eager to learn and improve. If you have any resources or tips that could help me better understand the project's workflow or contribution process, I'd be grateful.

I understand the project is volunteer-run and appreciate your time in reviewing this PR, especially during the holiday season. Please let me know if you need any further information from me or if there's anything else I can do to improve my contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants