Skip to content

ohorban/flask_webpage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HW5: Flask Webpage (Twitter clone)

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.

Functionality:

  1. Log In
    1. Presents a from to a user to enter their username and password
    2. Displays an appropriate ERROR message if credentials are incorrect
    3. Only visible if the user is NOT logged in
  2. Log Out
    1. Logs a user out
    2. Only visible if the user is logged in
  3. Sign Up
    1. Presents a from to a user to enter their username, password and repeated password
    2. If the account already exists, an appropriate ERROR message will appear
    3. If 2 password don't match, an appropriate ERROR message will appear
  4. Home
    1. Visible to anyone when logged in or logged out
    2. Displays all the messages in the system
    3. Messages are ordered chronologically with the most recent messages at the top
    4. Each message includes a username, a text, and the time the message was posted
    5. Has an option to delete and edit messages that were posted by the logged in user
    6. Has a button that outputs all messages in json format
  5. Create a message
    1. Presents a from to a user to enter the message they want to post
  6. Search
    1. Presents a from to a user to enter what messages are they looking for
    2. Outputs messages tat contain the entered word or phrase
    3. Has an option to delete and edit messages that were posted by the logged in user
  7. Your Account
    1. Displays all messages that the user has posted
    2. Has an option to delete and edit messages that were posted by the logged in user
    3. Gives an option to change your password
    4. Gives an option to delete your account
  8. Change Password
    1. Presents a from to a user to enter the old password, new password and repeat new password
    2. Displays appropriate message if old password is wrong
    3. If 2 new password don't match, an appropriate ERROR message will appear
  9. Delete your account
    1. Deletes your username and password
    2. 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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published