Skip to content

Comments

add delete post functionality and setup project#23

Open
mudassir-jmi wants to merge 1 commit intoMeNsaaH:masterfrom
mudassir-jmi:master
Open

add delete post functionality and setup project#23
mudassir-jmi wants to merge 1 commit intoMeNsaaH:masterfrom
mudassir-jmi:master

Conversation

@mudassir-jmi
Copy link

This pull request introduces two main enhancements to the project:

Delete Post Functionality:

Added the ability for users to delete posts.
Included necessary views, templates, and URLs to support this feature.
Ensured proper authorization checks so that only the post owner can delete their posts.
Form Validation for Adding Posts:
Implemented validation in the add post form to prevent users from submitting blank posts.
Added error messages and user feedback to guide users in providing necessary content before submission.

Changes Made:

Created a delete view in views.py.
Updated urls.py to include the delete post URL pattern.
Modified templates to include delete post buttons/links.
Added form validation logic to the add post form in forms.py or directly in the template, ensuring posts are not empty.
Updated unit tests to cover the new functionality and validation.

Testing:

Manually tested the delete functionality to confirm that posts are correctly deleted and proper authorization is enforced.
Manually tested the add post form to ensure that blank posts cannot be submitted and appropriate error messages are displayed.

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.

1 participant