If I were listing out posts on a page through Django, and say I wanted to give users the option to bookmark a post. I would create a view "bookmark_post", but I would have to redirect them somewhere after the function is completed, right? How would I redirect them to exactly the same place they were on the page before they bookmarked it, so they wouldn't have to always keep scrolling down to find it after bookmarking?
I feel like I'm somehow overcomplicating this, or maybe I don't have to create an entirely new view in order to bookmark a post. Do you have any ideas? Thanks again.
Edit: Main Question now: is there a way to bookmark a post without redirecting the page? I currently have a User model, with a ManyToManyField of 'bookmarks'. Is it possible to not use a view to add a bookmark to the User's profile? I feel it would be tedious to have to wait for the page to redirect every time you bookmarked something, similar to how it would be tedious if you had to wait for the page to redirect everytime you "liked" something.