Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
41 changes: 9 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,60 +11,37 @@ Welcome to the **Flask Blog Project**! πŸš€ This is a simple blogging platform b

---

## Installation & Setup

## Installation & Setup
```sh
git clone https://github.com/Alph702/Blog.git
cd Blog
```

```sh
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
pip install uv
```

**For dev**:
```sh
pip install -r requirements.txt
uv sync
```
**For use**:
```sh
rm Blog.db
uv sync --no-dev
```

```sh
python app.py
uv run app.py
```
Your blog should be running at **http://127.0.0.1:8080/** πŸŽ‰

---

## Deployment on PythonAnywhere
Create an account on [PythonAnywhere](https://www.pythonanywhere.com/) and log in.

- Navigate to the **Web** tab
- Click **Add a new web app**
- Select **Flask** and choose the latest Python version

- Navigate to the **Files** tab
- Upload your project files (or clone from GitHub using `git clone` in a **Bash Console**)
## Tests

- Go to **Web** β†’ Edit the WSGI configuration file
- Modify it to include:
```python
import sys
sys.path.insert(0, '/home/yourusername/Blog') # Change to your PythonAnywhere username

from app import app as application
```

Open a **Bash Console** and run:
```sh
pip install -r /home/yourusername/Blog/requirements.txt --user
uv run pytest
```

Go to the **Web** tab and click **Reload**. Your blog is now live! πŸŽ‰

---
## Contributing

Feel free to fork the repository, submit issues, or contribute to improve this project. πŸš€

Expand Down
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[project]
name = "blog"
version = "0.1.0"
description = "Hacker-Themed Flask Blog Platform"
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
dependencies = [
"flask>=3.1.2",
"psycopg2-binary>=2.9.11",
"python-dateutil>=2.9.0.post0",
"python-dotenv>=1.1.1",
"pytz>=2025.2",
"requests>=2.32.5",
"supabase>=2.22.0",
"werkzeug>=3.1.3",
]

[dependency-groups]
dev = [
"playwright>=1.55.0",
"pytest>=8.4.2",
]
11 changes: 0 additions & 11 deletions requirements.txt

This file was deleted.

Loading
Loading