- 利用 Django 的 ORM 进行数据库交互;除非为了性能,否则避免使用原始 SQL 查询。
- 将业务逻辑保留在模型和表单中;保持视图轻量,专注于请求处理。
Django Best Practices Django Models
Django 模型规则,强调 ORM 使用、数据库交互和数据验证。
Django Best Practices Django Models by liaosw97 · 68ef9a2
npx skillmds@latest add liaosw97/django-best-practices-django-models File contents
---name: django-best-practices-django-modelsdescription: Django 模型规则,强调 ORM 使用、数据库交互和数据验证。---- 利用 Django 的 ORM 进行数据库交互;除非为了性能,否则避免使用原始 SQL 查询。- 将业务逻辑保留在模型和表单中;保持视图轻量,专注于请求处理。
liaosw97/awesome-rules-skills/tree/main/plugins/django/skills/django-best-practices-django-models commit 68ef9a2ddf
Frequently asked questions
Run npx skillmds@latest add liaosw97/django-best-practices-django-models in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Django 模型规则,强调 ORM 使用、数据库交互和数据验证。 It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
liaosw97 (@liaosw97) published this skill. Their other Agent Skills are listed on their SkillMD profile.