A simple blog application built with Flask, SQLAlchemy, and other essential libraries.
-
Clone the repository:
git clone https://github.com/Luca-Melop/blog.git cd blog
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Set up environment variables:
export SECRET_KEY='your_secret_key' export DATABASE_URL='sqlite:///blog.db' export MAIL_USERNAME='your_email@gmail.com' export MAIL_PASSWORD='your_email_password'
-
Initialize the database:
flask db upgrade
-
Run the application:
flask run
- Homepage:
http://127.0.0.1:5000/
- Admin dashboard:
http://127.0.0.1:5000/admin
(Login required)
/
- Display all blog posts/post/<int:post_id>
- Display a specific post/login
- User login/add
- Add a new blog post (Admin only)/edit/<int:post_id>
- Edit an existing post (Admin only)/delete/<int:post_id>
- Delete a post (Admin only)/contact
- Contact form
For any queries or issues, please contact lucamezger88@gmail.com
.