Flask Blog is a web application built with Flask, a lightweight web framework in Python. It allows users to create, publish, and manage blog posts.
- User registration and authentication system
- Create, edit, and delete blog posts
- View and comment on blog posts
- User profile management
- Responsive design for mobile and desktop devices
- Clone the repository:
git clone https://github.com/your-username/your-repo.git
- Change to the project's directory:
cd FlaskBlog
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
- On Windows (PowerShell):
.\venv\Scripts\Activate.ps1
- On macOS and Linux:
source venv/bin/activate
- Install the required packages:
pip install -r requirements.txt
- Set up the database:
- Create a PostgreSQL database.
- Update the SQLALCHEMY_DATABASE_URI variable in the config.py file with your database URI.
- Start the application:
python run.py
The application will be accessible at http://localhost:5000.
The application can be deployed on Render. To do so, follow these steps:
-
Set up an account on Render (https://render.com/) if you haven't already.
-
Create a new web service on Render.
-
Configure the following settings in the Render dashboard:
- Build Command: pip install -r requirements.txt
- Start Command: gunicorn run:app
- Set up the required environment variables:
- SQLALCHEMY_DATABASE_URI: The URI for your production database.
- Other configuration variables as needed.
- Deploy the application.
Contributions are welcome! If you'd like to contribute to Flask Blog, please follow these steps:
-
Fork the repository.
-
Create a new branch:
git checkout -b feature/my-new-feature
- Commit your changes:
git checkout -b feature/my-new-feature
- Push the branch to your forked repository:
git push origin feature/my-new-feature
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.