This PR adds two new functionalities - writing new posts and editing existing posts - both of which operate within the new write-post.html template.
There is a new button on the profile page which allows a user to write a new post, and clicking on any existing post now gives the user an "edit post" button if they are the author of the post they're viewing.
Editing/writing a new post functions within the limits set in the limits dict in the parameters file. This means the user will be limited from writing a post title or body that is too long, and also too short. The title field is required, but the body is not.
After editing a post or creating a new post, the user is redirected to the page for viewing their post. This required a change in the data manager, interpreter, and server to return the PID after inserting a post.
Issues:
Currently, scrolling for the edit post view is restricted to within the box, which feels ugly. I am going to fix this when I overhaul a few existing template functionalities with js in a later PR. However, everything functions as expected, it's just not pretty.
This PR adds two new functionalities - writing new posts and editing existing posts - both of which operate within the new
write-post.html
template.There is a new button on the profile page which allows a user to write a new post, and clicking on any existing post now gives the user an "edit post" button if they are the author of the post they're viewing.
Editing/writing a new post functions within the limits set in the limits dict in the parameters file. This means the user will be limited from writing a post title or body that is too long, and also too short. The title field is required, but the body is not.
After editing a post or creating a new post, the user is redirected to the page for viewing their post. This required a change in the data manager, interpreter, and server to return the PID after inserting a post.
Issues: Currently, scrolling for the edit post view is restricted to within the box, which feels ugly. I am going to fix this when I overhaul a few existing template functionalities with js in a later PR. However, everything functions as expected, it's just not pretty.