This repository contains the source code for a simple blog application. Users can create, read, update, and delete blog posts using this web-based application. It provides a user-friendly interface for managing and sharing blog content.
- ✨ User Registration and Authentication
- ✏️ Create and Edit Blog Posts
- 💬 View and Comment on Posts
- 👤 User Profiles
- 🔍 Search and Filter Posts
- 📱 Responsive Design for Mobile and Desktop
- 🐍 Python
- 🌐 Flask
- 🛢️ SQLAlchemy
- 🎨 HTML/CSS
- 📱 Bootstrap (optional)
- 📚 Other technologies and libraries used...
To run this application locally, you will need to set up some environment variables. Follow these steps:
-
Clone this repository:
git clone https://github.com/akashprap/Flask_Blog
-
Create a virtual environment (optional but recommended):
virtualenv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
-
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up the following environment variables:
-
SECRET_KEY
: A secret key for your application. -
SQLALCHEMY_DATABASE_URI
: The URI for your database (SQLite). -
EMAIL_USER
: Your email address for sending emails. -
EMAIL_PASS
: Your email password or an app-specific password for sending emails. -
Open a terminal or Command Prompt window.
-
Set the
EMAIL_USER
andEMAIL_PASS
environment variables using the following commands:-
For Windows:
setx EMAIL_USER "your_email@gmail.com" setx EMAIL_PASS "your_email_password_or_app_password"
-
For macOS and Linux:
export EMAIL_USER="your_email@gmail.com" export EMAIL_PASS="your_email_password_or_app_password"
-
Replace
"your_email@gmail.com"
with your email address and"your_email_password_or_app_password"
with your email password or an app-specific password if applicable.You can set these environment variables in your system or by using a tool like
python-dotenv
. -
-
Start the application:
python run.py
-
Access the app in your web browser at
http://localhost:5000
.
- Register for an account or log in if you already have one.
- Create new blog posts, edit existing ones, and share your thoughts with the world!
- Explore and engage with other users' posts.
Contributions are welcome! If you'd like to suggest changes or report bugs, please open an issue or submit a pull request.
If you have any questions or feedback, you can reach me at Developer.
Happy Blogging! 🚀