Git Product home page Git Product logo

flask_webpage's Introduction

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.