https://github.com/prajapatsur/python-blog-project
https://github.com/prajapatsur/python-blog-project
bootstrap flask flask-sqlalchemy html python
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/prajapatsur/python-blog-project
- Owner: prajapatsur
- Created: 2025-03-09T14:09:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-12T15:23:31.000Z (over 1 year ago)
- Last Synced: 2025-06-01T00:44:21.158Z (about 1 year ago)
- Topics: bootstrap, flask, flask-sqlalchemy, html, python
- Language: HTML
- Homepage:
- Size: 13.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Blog Project
This is a simple blog application built using Flask, SQLAlchemy, and Flask-Login. The application allows users to sign up, log in, create posts, and view posts created by other users.
## Features
- User Authentication (Sign Up, Log In, Log Out)
- Create, View, and Delete Posts
- Flash Messages for User Feedback
- Bootstrap for Responsive Design
## Project Structure
```
Python Blog Project/
│
├── website/
│ ├── __init__.py
│ ├── auth.py
│ ├── models.py
│ ├── views.py
│ ├── templates/
│ │ ├── layout.html
│ │ ├── home.html
│ │ ├── login.html
│ │ ├── signup.html
│ │ ├── create_post.html
│ │ └── posts.html
│ └── static/
│ └── style.css
│
└── README.md
```
## Installation
1. Clone the repository:
```sh
git clone https://github.com/yourusername/python-blog-project.git
cd python-blog-project
```
2. Create a virtual environment and activate it:
```sh
python -m venv myenv
source myenv/bin/activate # On Windows use `.\myenv\Scripts\activate`
```
3. Install the required packages:
```sh
pip install -r requirements.txt
```
4. Set up the database:
```sh
flask shell
>>> from website import create_app, db
>>> app = create_app()
>>> with app.app_context():
... db.create_all()
```
5. Run the application on terminal:
```sh
python app.py
```
## Usage
- Navigate to `http://127.0.0.1:5000/` in your web browser.
- Sign up for a new account or log in with an existing account.
- Create new posts, view posts, and delete your own posts.
## Contributing
Contributions are welcome! Please fork the repository and submit a pull request.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Acknowledgements
- [Flask](https://flask.palletsprojects.com/)
- [SQLAlchemy](https://www.sqlalchemy.org/)
- [Flask-Login](https://flask-login.readthedocs.io/)
- [Bootstrap](https://getbootstrap.com/)
### It is a guided project
[YouTube- Tech With Tim](https://www.youtube.com/@TechWithTim)