Video Demo: https://youtu.be/FRiOKu7olwM
Blog50 is a web app built with flask to submit as cs50x final project.
My final project in CS50 is a blog with a dashboard. Users must register or login to add posts, categories and comments. Each user has their own control panel where they can control their posts and profiles.
-
Add posts and categories.
-
User's Profile.
-
Login and Register.
-
Author Page to view all posts by that author.
-
Category Page to view all posts in specific category.
-
project
- Main Directory.-
db
- contains sql tables script file.project_db_script.sql
- sql tables script file.
-
falsk_session
- contains session generated files. -
static
- Holds all static files.-
images
- Holds all static images and icons.-
posts
- Holds all posts images. -
users
- Holds all users images. -
user-blue-thumbnail.png
- user default image.
-
-
favicon.ico
- Blog favorite icon. -
styles.css
- Css file.
-
-
templates
- Holds all html files.-
layout.html
- Blog template. -
index.html
- Blog main page. -
apology.html
- Errors messages template. -
category.html
- Show posts in specific category. -
post.html
- Show specific post. -
dashboard
- Contains all dashboard html files.-
layout.html
- Dashboard template. -
index.html
- Dashboard main page. -
new_post.html
- Add new post. -
edit_post.html
- Edit post. -
new_cat.html
- Add new category. -
edit_cat.html
- Edit category.
-
-
user
- Contains all user html files.-
login.html
- Login page. -
register.html
- Register page. -
profile.html
- Register page.
-
-
-
views
- Contains all routes files.-
blog.py
- Control blog routes. -
dashboard.py
- Control dashboard routes. -
user.py
- Control user routes.
-
-
app.py
- app main file. -
db.py
- all db queries. -
helpers.py
- helper functions. -
project.db
- The blog database. -
requirements.txt
- Project required dependencies.
-
-
Install project dependencies by running
pip install -r requirements.txt
-
Run
flask run
and visit http://127.0.0.1:5000 or the link that appears on the command line. -
if
flask run
not working activate the virtual environment: On Windows PowerShell, run: .venv\Scripts\activate -
if still not working try
python -m flask run