This PR implements a new feature that allows users to create new pages via a text editor with markdown support. It includes the following changes:
Added a new HTML page create_page.html under the templates directory. This page contains a form with a text editor where users can write their content in markdown.
Modified main.py to add a new GET endpoint /create-page that serves the create_page.html page to signed-in users.
Modified main.py to add a new POST endpoint /create-page that handles the submission of the new page content from the form in create_page.html.
Added a check in the GET endpoint to verify if the user is signed in before serving the create_page.html page.
Summary of Changes
Created create_page.html with a form for page creation.
Added a new GET endpoint /create-page to serve the create_page.html page.
Added a new POST endpoint /create-page to handle page creation submissions.
Implemented user authentication check in the GET endpoint to restrict access to signed-in users.
Fixes #58.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/page-creation
🎉 Latest improvements to Sweep:
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 implements a new feature that allows users to create new pages via a text editor with markdown support. It includes the following changes:
create_page.html
under thetemplates
directory. This page contains a form with a text editor where users can write their content in markdown.main.py
to add a new GET endpoint/create-page
that serves thecreate_page.html
page to signed-in users.main.py
to add a new POST endpoint/create-page
that handles the submission of the new page content from the form increate_page.html
.create_page.html
page.Summary of Changes
create_page.html
with a form for page creation./create-page
to serve thecreate_page.html
page./create-page
to handle page creation submissions.Fixes #58.
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: