This PR addresses two main tasks. First, it creates a new profile template (profile.html) to display the user's profile information. Second, it refactors the post() function in main.py to return all posts on a GET request and handle the creation of a new post on a POST request.
Summary of Changes
Created a new file profile.html in the templates directory to display the user's profile information.
Added a basic HTML structure with placeholders for the user's username and posts.
Refactored the post() function in main.py to handle GET and POST requests appropriately:
If the request method is GET, the function now returns all posts.
If the request method is POST, the function handles the creation of a new post as before.
Please review and merge this PR. Thank you!
Fixes #16.
To checkout this PR branch, run the following command in your terminal:
Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
We released a demo of our chunker, where you can find the corresponding blog and code.
💡 To get Sweep to edit this pull request, you can:
Leave a comment below to get Sweep to edit the entire PR
Leave a comment in the code will only modify the file
Edit the original issue to get Sweep to recreate the PR from scratch
Description
This PR addresses two main tasks. First, it creates a new profile template (
profile.html
) to display the user's profile information. Second, it refactors thepost()
function inmain.py
to return all posts on a GET request and handle the creation of a new post on a POST request.Summary of Changes
profile.html
in thetemplates
directory to display the user's profile information.post()
function inmain.py
to handle GET and POST requests appropriately:Please review and merge this PR. Thank you!
Fixes #16.
To checkout this PR branch, run the following command in your terminal:
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: