LC101 assignment
Web app using flask. Continuation of build-a-blog.
- A blog is a series of entries
- Each entry includes a title, body, and user
The app must meet several requirements:
- List all users on homepage
- List all previous blog entries in reverse-chronological order
- Users must be signed in before creating a new blog entry
- Users can log in
- New users can register
- Display the individual blog entry after creation
- Include a menu bar with available commands
- User enters a username that is stored in the database with the correct password and is redirected to the /newpost page with their username being stored in a session
- User enters a username that is stored in the database with an incorrect password and is redirected to the /login page with a message that their password is incorrect
- User tries to login with a username that is not stored in the database and is redirected to the /login page with a message that this username does not exist
- "/" - GET: Display list of all users
- "/blog" - GET: Display list of all blog posts in reverse-chronological order
- "/blog?id=id" - GET: Display specific blog entries
- "/blog?userid=userid" - GET: Display blog entries for specific user
- "/blog/newpost" - GET & POST: Display form for user to add new post
- "/login" - GET & POST: Display form for user to log in
- "/signup" - GET & POST: Display for for user to sign up