This project is a blog developed using Flask. It allows users to view posts, add new entries, and leave comments.
myblog/
├── instance/
│ ├── __init__.py
│ └── config.py
├── templates/
│ ├── base.html
│ ├── index.html
│ ├── post.html
│ └── new_post.html
├── app.py
├── requirements.txt
└── README.md
-
instance/
: Configuration files.__init__.py
: Package initialization.config.py
: Application configuration.
-
templates/
: HTML templates.base.html
: Common page structure.index.html
: Home page.post.html
: Post page.new_post.html
: New post page.
-
app.py
: Main application file. -
requirements.txt
: Project dependencies.
- Python 3.8+
- pip
git clone https://github.com/AlexTkDev/MyFlaskProject.git
cd myblog
pip install -r requirements.txt
flask run
The application will be available at http://127.0.0.1:5000.
Bootstrap 5 is used for styling the pages, included through base.html
.
Route: /
Description: Displays all posts.
Route: /post/<post_id>
Description: Displays the selected post.
Route: /new
Description: Form for adding a new post.
This project is a simple blog on Flask that can be extended and modified to suit your needs. Flask provides flexibility and ease of development, and using templates and Bootstrap 5 allows for creating modern and responsive interfaces.