Files
blog/AGENTS.md

2.0 KiB

AGENTS.md — blog (六桂流芳的com)

Tech stack

  • Python 3.12.7, Django 5.1, SQLite (dev) / PostgreSQL (prod via psycopg2-binary)
  • zh-Hans locale, Asia/Shanghai timezone

Key commands

Run from project root:

python manage.py runserver                  # dev server
python manage.py makemigrations              # after model changes
python manage.py migrate                     # apply migrations
python manage.py createsuperuser             # admin login
python manage.py collectstatic               # prod: gather static files to data/static/

Package management

pip install -r requirements.txt              # sync deps (no lockfile)

uv (v0.8.3) is in requirements.txt but not the primary workflow.

Project layout

apps/                # 所有 Django 应用
└── blog/            # 博客应用 (models, views, templates, admin)
    └── static/blog/ # 共享 CSS (style.css)
config/              # Django 项目配置 (settings.py, urls.py, wsgi.py 等)
manage.py
db.sqlite3           # dev DB (gitignored)

data/                # 运行时数据
├── logs/            # Django logs (rotating, gitignored)
├── static/          # collectstatic output (gitignored)
└── media/           # user uploads (gitignored)

Key models

  • Posttitle, content (MDEditor), category (FK), status (draft/published), publish_date
  • Categoryname, description
  • SiteSettings — singleton: summary_length, contact fields

Admin at /admin/ with MDEditor on Post content field.

Local overrides

Create config/local_settings.py to override any setting. Imported at the bottom of settings.py.

Git workflow

feature/* or bugfix/* → develop → main

Remote: ssh://git@git.yuangyaa.com:222/yuangyaa/blog.git

What's NOT configured

  • No tests (tests.py is blank)
  • No linting, formatting, or type checking
  • No CI/CD
  • No pre-commit hooks
  • No Docker