{"title":"术语","version":"6.0","locale":"zh-hans","docname":"glossary","url":"/zh-hans/6.0/glossary/","canonical":"https://djangodocs.dev/zh-hans/6.0/glossary/","summary":"具体的模型 Link to this term # 一个非抽象 ( abstract=False ) 模型。 字段 Link to this term # 一个属性在 model 中; 一个给定的字段通常被映射到数据库表的一列上。 参见 模型 。 通用视图 Link to this term # 高阶的 view…","html":"<h1>术语<a class=\"heading-anchor\" href=\"#glossary\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<dl class=\"glossary\">\n<dt id=\"term-concrete-model\">具体的模型<a class=\"heading-anchor\" href=\"#term-concrete-model\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p>一个非抽象 (<a class=\"reference internal\" href=\"/zh-hans/6.0/ref/models/options/#django.db.models.Options.abstract\" title=\"django.db.models.Options.abstract\"><code class=\"xref py py-attr docutils literal notranslate\"><span class=\"pre\">abstract=False</span></code></a>) 模型。</p>\n</dd>\n<dt id=\"term-field\">字段<a class=\"heading-anchor\" href=\"#term-field\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p>一个属性在 <a class=\"reference internal\" href=\"#term-model\"><span class=\"xref std std-term\">model</span></a> 中; 一个给定的字段通常被映射到数据库表的一列上。</p>\n<p>参见 <a class=\"reference internal\" href=\"/zh-hans/6.0/topics/db/models/\"><span class=\"doc\">模型</span></a>。</p>\n</dd>\n<dt id=\"term-generic-view\">通用视图<a class=\"heading-anchor\" href=\"#term-generic-view\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p>高阶的 <a class=\"reference internal\" href=\"#term-view\"><span class=\"xref std std-term\">view</span></a> 函数针对开发中常见的习惯用法或模式，提供了一种抽象/通用的实现。</p>\n<p>参见 <a class=\"reference internal\" href=\"/zh-hans/6.0/topics/class-based-views/\"><span class=\"doc\">基于类的视图</span></a>。</p>\n</dd>\n<dt id=\"term-model\">模型<a class=\"heading-anchor\" href=\"#term-model\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p>模型存储你的应用程序的数据。</p>\n<p>参见 <a class=\"reference internal\" href=\"/zh-hans/6.0/topics/db/models/\"><span class=\"doc\">模型</span></a>。</p>\n</dd>\n<dt id=\"term-MTV\">MTV<a class=\"heading-anchor\" href=\"#term-MTV\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p>&quot;模型-模板-数据&quot;(&quot;Model-template-view&quot;); 一种软件模式，风格类似于MVC，但是更好地描述了 Django 所做的事。</p>\n<p>参见 <a class=\"reference internal\" href=\"/zh-hans/6.0/faq/general/#faq-mtv\"><span class=\"std std-ref\">the FAQ entry</span></a>。</p>\n</dd>\n<dt id=\"term-MVC\">MVC<a class=\"heading-anchor\" href=\"#term-MVC\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p><a class=\"reference external\" href=\"https://en.wikipedia.org/wiki/Model-view-controller\">模型-视图-控制器</a>; 一种软件开发模式。Django <a class=\"reference internal\" href=\"/zh-hans/6.0/faq/general/#faq-mtv\"><span class=\"std std-ref\">基于 MVC 做了某些扩展</span></a>。</p>\n</dd>\n<dt id=\"term-project\">项目<a class=\"heading-anchor\" href=\"#term-project\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p>一个 Python 包 —— 即一个代码目录 -- 它包含 Django 的一个实例中所有的设置。这包括数据库配置，Django 的特定选项和特定应用程序设置。</p>\n</dd>\n<dt id=\"term-property\">属性<a class=\"heading-anchor\" href=\"#term-property\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p>也被称为 &quot;管理属性&quot;，自 Python 2.2 版本起支持的功能。这是用一个巧妙的方法来实现的属性，其用法类似于属性的访问，但实现是调用方法。</p>\n<p>参见 <a class=\"reference external\" href=\"https://docs.python.org/3/library/functions.html#property\" title=\"(in Python v3.14)\"><code class=\"xref py py-class docutils literal notranslate\"><span class=\"pre\">property</span></code></a>。</p>\n</dd>\n<dt id=\"term-queryset\">查询结果集<a class=\"heading-anchor\" href=\"#term-queryset\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p>一个对象表示了从数据库中取到的某些行。</p>\n<p>参见 <a class=\"reference internal\" href=\"/zh-hans/6.0/topics/db/queries/\"><span class=\"doc\">执行查询</span></a>。</p>\n</dd>\n<dt id=\"term-slug\">斜杠<a class=\"heading-anchor\" href=\"#term-slug\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p>作为某些东西的简短标签，只能包含字母，数字，下划线或连字符。他们一般被用于 URL。例如，在一个典型的博客文章的网址：</p>\n<pre class=\"literal-block\"><a class=\"reference external\" href=\"https://www.djangoproject.com/weblog/2008/apr/12/\">https://www.djangoproject.com/weblog/2008/apr/12/</a><strong>spring</strong>/</pre>\n<p>最末尾 (<code class=\"docutils literal notranslate\"><span class=\"pre\">spring</span></code>) 是一个斜杠。</p>\n</dd>\n<dt id=\"term-template\">模板<a class=\"heading-anchor\" href=\"#term-template\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p>一个文本块，作为用来表示数据的格式。模板有助于从数据本身抽象地展示数据。</p>\n<p>参见 <a class=\"reference internal\" href=\"/zh-hans/6.0/topics/templates/\"><span class=\"doc\">模板</span></a>。</p>\n</dd>\n<dt id=\"term-view\">视图<a class=\"heading-anchor\" href=\"#term-view\"><span class=\"visually-hidden\">Link to this term</span><span aria-hidden=\"true\">#</span></a></dt><dd><p>负责渲染页面的函数。</p>\n</dd>\n</dl>","rootId":"glossary","toc":[],"breadcrumbs":[],"prev":{"docname":"misc/distributions","title":"Django 的第三方发布包","url":"/zh-hans/6.0/misc/distributions/"},"next":{"docname":"releases/index","title":"发行说明","url":"/zh-hans/6.0/releases/"},"formats":{"html":"/zh-hans/6.0/glossary/","markdown":"/zh-hans/6.0/glossary.md","json":"/zh-hans/6.0/glossary.json"},"source":"https://github.com/django/django/blob/stable/6.0.x/docs/glossary.txt","official":"https://docs.djangoproject.com/zh-hans/6.0/glossary/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0"],"inLocales":["en","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}