fix some bugs && change push way
This commit is contained in:
24
AGENTS.md
24
AGENTS.md
@@ -7,14 +7,14 @@
|
||||
|
||||
## Key commands
|
||||
|
||||
Run from `myblog/`:
|
||||
Run from project root:
|
||||
|
||||
```bash
|
||||
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 staticfiles/
|
||||
python manage.py collectstatic # prod: gather static files to data/static/
|
||||
```
|
||||
|
||||
## Package management
|
||||
@@ -28,13 +28,17 @@ pip install -r requirements.txt # sync deps (no lockfile)
|
||||
## Project layout
|
||||
|
||||
```
|
||||
myblog/
|
||||
├── blog/ # main app (models, views, templates, admin)
|
||||
│ └── static/blog/ # shared CSS (single style.css)
|
||||
├── myblog/ # Django project settings/settings.py
|
||||
├── manage.py
|
||||
├── db.sqlite3 # dev DB (gitignored)
|
||||
└── media/ # user uploads (gitignored)
|
||||
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
|
||||
@@ -47,7 +51,7 @@ Admin at `/admin/` with MDEditor on Post content field.
|
||||
|
||||
## Local overrides
|
||||
|
||||
Create `myblog/myblog/local_settings.py` to override any setting. Imported at the bottom of `settings.py`.
|
||||
Create `config/local_settings.py` to override any setting. Imported at the bottom of `settings.py`.
|
||||
|
||||
## Git workflow
|
||||
|
||||
|
||||
Reference in New Issue
Block a user