For this project I've used Python (flask), SQL, CSS, HTML and Jinja2 to create a WEBPAGE that acts as a social network very similar to Twitter. Users can create accounts and post messages, which will be seen by everyone.
- Log In
- Presents a from to a user to enter their username and password
- Displays an appropriate ERROR message if credentials are incorrect
- Only visible if the user is NOT logged in
- Log Out
- Logs a user out
- Only visible if the user is logged in
- Sign Up
- Presents a from to a user to enter their username, password and repeated password
- If the account already exists, an appropriate ERROR message will appear
- If 2 password don't match, an appropriate ERROR message will appear
- Home
- Visible to anyone when logged in or logged out
- Displays all the messages in the system
- Messages are ordered chronologically with the most recent messages at the top
- Each message includes a username, a text, and the time the message was posted
- Has an option to delete and edit messages that were posted by the logged in user
- Has a button that outputs all messages in json format
- Create a message
- Presents a from to a user to enter the message they want to post
- Search
- Presents a from to a user to enter what messages are they looking for
- Outputs messages tat contain the entered word or phrase
- Has an option to delete and edit messages that were posted by the logged in user
- Your Account
- Displays all messages that the user has posted
- Has an option to delete and edit messages that were posted by the logged in user
- Gives an option to change your password
- Gives an option to delete your account
- Change Password
- Presents a from to a user to enter the old password, new password and repeat new password
- Displays appropriate message if old password is wrong
- If 2 new password don't match, an appropriate ERROR message will appear
- Delete your account
- Deletes your username and password
- Keeps the messages you've posted
The website was populated with 20 accounts that posted 20 posts each. I used my propaganda generator from previous assignments to do that. I connected my Flask app to Python Anywhere, so you can visit The Website The python file that initializes the database and the database files were not included in this repository. I have developed this webpage to be safe against some HTML injection attacks and SQL injection attacks, but there is still a lot of room for improvmnet!