{"title":"System check framework","version":"3.0","locale":"pl","docname":"ref/checks","url":"/pl/3.0/ref/checks/","canonical":"https://djangodocs.dev/pl/3.0/ref/checks/","summary":"The system check framework is a set of static checks for validating Django projects. It detects common problems and provides hints for how to fix them.","html":"<h1>System check framework<a class=\"heading-anchor\" href=\"#system-check-framework\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>The system check framework is a set of static checks for validating Django\nprojects. It detects common problems and provides hints for how to fix them.\nThe framework is extensible so you can easily add your own checks.</p>\n<p>For details on how to add your own checks and integrate them with Django’s\nsystem checks, see the <a class=\"reference internal\" href=\"/pl/3.0/topics/checks/\"><span class=\"doc\">System check topic guide</span></a>.</p>\n<section id=\"api-reference\">\n<h2>API reference<a class=\"heading-anchor\" href=\"#api-reference\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"checkmessage\">\n<h3><code class=\"docutils literal notranslate\">CheckMessage</code><a class=\"heading-anchor\" href=\"#checkmessage\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"django.core.checks.CheckMessage\">\n<em class=\"property\"><span class=\"k\">class</span> </em><span class=\"sig-name descname\">CheckMessage</span><span class=\"sig-paren\">(</span><em class=\"sig-param\">level</em>, <em class=\"sig-param\">msg</em>, <em class=\"sig-param\">hint<span class=\"o\">=</span><span class=\"default_value\">None</span></em>, <em class=\"sig-param\">obj<span class=\"o\">=</span><span class=\"default_value\">None</span></em>, <em class=\"sig-param\">id<span class=\"o\">=</span><span class=\"default_value\">None</span></em><span class=\"sig-paren\">)</span><a class=\"heading-anchor\" href=\"#django.core.checks.CheckMessage\"><span class=\"visually-hidden\">Link to this definition</span><span aria-hidden=\"true\">#</span></a></dt>\n<dd></dd></dl>\n\n<p>The warnings and errors raised by system checks must be instances of\n<code class=\"docutils literal notranslate\">CheckMessage</code>. An instance encapsulates a single reportable error or\nwarning. It also provides context and hints applicable to the message, and a\nunique identifier that is used for filtering purposes.</p>\n<p>Constructor arguments are:</p>\n<dl class=\"simple\">\n<dt><code class=\"docutils literal notranslate\">level</code></dt><dd><p>The severity of the message. Use one of the predefined values: <code class=\"docutils literal notranslate\">DEBUG</code>,\n<code class=\"docutils literal notranslate\">INFO</code>, <code class=\"docutils literal notranslate\">WARNING</code>, <code class=\"docutils literal notranslate\">ERROR</code>, <code class=\"docutils literal notranslate\">CRITICAL</code>. If the level is greater or\nequal to <code class=\"docutils literal notranslate\">ERROR</code>, then Django will prevent management commands from\nexecuting. Messages with level lower than <code class=\"docutils literal notranslate\">ERROR</code> (i.e. warnings) are\nreported to the console, but can be silenced.</p>\n</dd>\n<dt><code class=\"docutils literal notranslate\">msg</code></dt><dd><p>A short (less than 80 characters) string describing the problem. The string\nshould <em>not</em> contain newlines.</p>\n</dd>\n<dt><code class=\"docutils literal notranslate\">hint</code></dt><dd><p>A single-line string providing a hint for fixing the problem. If no hint\ncan be provided, or the hint is self-evident from the error message, the\nhint can be omitted, or a value of <code class=\"docutils literal notranslate\">None</code> can be used.</p>\n</dd>\n<dt><code class=\"docutils literal notranslate\">obj</code></dt><dd><p>Optional. An object providing context for the message (for example, the\nmodel where the problem was discovered). The object should be a model,\nfield, or manager or any other object that defines a <code class=\"docutils literal notranslate\">__str__()</code> method.\nThe method is used while reporting all messages and its result precedes the\nmessage.</p>\n</dd>\n<dt><code class=\"docutils literal notranslate\">id</code></dt><dd><p>Optional string. A unique identifier for the issue. Identifiers should\nfollow the pattern <code class=\"docutils literal notranslate\">applabel.X001</code>, where <code class=\"docutils literal notranslate\">X</code> is one of the letters\n<code class=\"docutils literal notranslate\">CEWID</code>, indicating the message severity (<code class=\"docutils literal notranslate\">C</code> for criticals, <code class=\"docutils literal notranslate\">E</code> for\nerrors and so). The number can be allocated by the application, but should\nbe unique within that application.</p>\n</dd>\n</dl>\n<p>There are subclasses to make creating messages with common levels easier. When\nusing them you can omit the <code class=\"docutils literal notranslate\">level</code> argument because it is implied by the\nclass name.</p>\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"django.core.checks.Debug\">\n<em class=\"property\"><span class=\"k\">class</span> </em><span class=\"sig-name descname\">Debug</span><span class=\"sig-paren\">(</span><em class=\"sig-param\">msg</em>, <em class=\"sig-param\">hint<span class=\"o\">=</span><span class=\"default_value\">None</span></em>, <em class=\"sig-param\">obj<span class=\"o\">=</span><span class=\"default_value\">None</span></em>, <em class=\"sig-param\">id<span class=\"o\">=</span><span class=\"default_value\">None</span></em><span class=\"sig-paren\">)</span><a class=\"heading-anchor\" href=\"#django.core.checks.Debug\"><span class=\"visually-hidden\">Link to this definition</span><span aria-hidden=\"true\">#</span></a></dt>\n<dd></dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"django.core.checks.Info\">\n<em class=\"property\"><span class=\"k\">class</span> </em><span class=\"sig-name descname\">Info</span><span class=\"sig-paren\">(</span><em class=\"sig-param\">msg</em>, <em class=\"sig-param\">hint<span class=\"o\">=</span><span class=\"default_value\">None</span></em>, <em class=\"sig-param\">obj<span class=\"o\">=</span><span class=\"default_value\">None</span></em>, <em class=\"sig-param\">id<span class=\"o\">=</span><span class=\"default_value\">None</span></em><span class=\"sig-paren\">)</span><a class=\"heading-anchor\" href=\"#django.core.checks.Info\"><span class=\"visually-hidden\">Link to this definition</span><span aria-hidden=\"true\">#</span></a></dt>\n<dd></dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"django.core.checks.Warning\">\n<em class=\"property\"><span class=\"k\">class</span> </em><span class=\"sig-name descname\">Warning</span><span class=\"sig-paren\">(</span><em class=\"sig-param\">msg</em>, <em class=\"sig-param\">hint=None obj=None</em>, <em class=\"sig-param\">id=None</em><span class=\"sig-paren\">)</span><a class=\"heading-anchor\" href=\"#django.core.checks.Warning\"><span class=\"visually-hidden\">Link to this definition</span><span aria-hidden=\"true\">#</span></a></dt>\n<dd></dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"django.core.checks.Error\">\n<em class=\"property\"><span class=\"k\">class</span> </em><span class=\"sig-name descname\">Error</span><span class=\"sig-paren\">(</span><em class=\"sig-param\">msg</em>, <em class=\"sig-param\">hint<span class=\"o\">=</span><span class=\"default_value\">None</span></em>, <em class=\"sig-param\">obj<span class=\"o\">=</span><span class=\"default_value\">None</span></em>, <em class=\"sig-param\">id<span class=\"o\">=</span><span class=\"default_value\">None</span></em><span class=\"sig-paren\">)</span><a class=\"heading-anchor\" href=\"#django.core.checks.Error\"><span class=\"visually-hidden\">Link to this definition</span><span aria-hidden=\"true\">#</span></a></dt>\n<dd></dd></dl>\n\n<dl class=\"py class\">\n<dt class=\"sig sig-object py\" id=\"django.core.checks.Critical\">\n<em class=\"property\"><span class=\"k\">class</span> </em><span class=\"sig-name descname\">Critical</span><span class=\"sig-paren\">(</span><em class=\"sig-param\">msg</em>, <em class=\"sig-param\">hint<span class=\"o\">=</span><span class=\"default_value\">None</span></em>, <em class=\"sig-param\">obj<span class=\"o\">=</span><span class=\"default_value\">None</span></em>, <em class=\"sig-param\">id<span class=\"o\">=</span><span class=\"default_value\">None</span></em><span class=\"sig-paren\">)</span><a class=\"heading-anchor\" href=\"#django.core.checks.Critical\"><span class=\"visually-hidden\">Link to this definition</span><span aria-hidden=\"true\">#</span></a></dt>\n<dd></dd></dl>\n\n</section>\n</section>\n<section id=\"builtin-tags\">\n<span id=\"system-check-builtin-tags\"></span><h2>Builtin tags<a class=\"heading-anchor\" href=\"#builtin-tags\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Django’s system checks are organized using the following tags:</p>\n<ul class=\"simple\">\n<li><p><code class=\"docutils literal notranslate\">admin</code>: Checks of any admin site declarations.</p></li>\n<li><p><code class=\"docutils literal notranslate\">caches</code>: Checks cache related configuration.</p></li>\n<li><p><code class=\"docutils literal notranslate\">compatibility</code>: Flags potential problems with version upgrades.</p></li>\n<li><p><code class=\"docutils literal notranslate\">database</code>: Checks database-related configuration issues. Database checks\nare not run by default because they do more than static code analysis as\nregular checks do. They are only run by the <a class=\"reference internal\" href=\"/pl/3.0/ref/django-admin/#django-admin-migrate\"><code class=\"xref std std-djadmin docutils literal notranslate\">migrate</code></a> command or if\nyou specify the <code class=\"docutils literal notranslate\">database</code> tag when calling the <a class=\"reference internal\" href=\"/pl/3.0/ref/django-admin/#django-admin-check\"><code class=\"xref std std-djadmin docutils literal notranslate\">check</code></a> command.</p></li>\n<li><p><code class=\"docutils literal notranslate\">models</code>: Checks of model, field, and manager definitions.</p></li>\n<li><p><code class=\"docutils literal notranslate\">security</code>: Checks security related configuration.</p></li>\n<li><p><code class=\"docutils literal notranslate\">signals</code>: Checks on signal declarations and handler registrations.</p></li>\n<li><p><code class=\"docutils literal notranslate\">staticfiles</code>: Checks <a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/staticfiles/#module-django.contrib.staticfiles\" title=\"django.contrib.staticfiles: An app for handling static files.\"><code class=\"xref py py-mod docutils literal notranslate\">django.contrib.staticfiles</code></a> configuration.</p></li>\n<li><p><code class=\"docutils literal notranslate\">templates</code>: Checks template related configuration.</p></li>\n<li><p><code class=\"docutils literal notranslate\">translation</code>: Checks translation related configuration.</p></li>\n<li><p><code class=\"docutils literal notranslate\">urls</code>: Checks URL configuration.</p></li>\n</ul>\n<p>Some checks may be registered with multiple tags.</p>\n</section>\n<section id=\"core-system-checks\">\n<h2>Core system checks<a class=\"heading-anchor\" href=\"#core-system-checks\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"backwards-compatibility\">\n<h3>Backwards compatibility<a class=\"heading-anchor\" href=\"#backwards-compatibility\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Compatibility checks warn of potential problems that might occur after\nupgrading Django.</p>\n<ul class=\"simple\">\n<li><p><strong>2_0.W001</strong>: Your URL pattern <code class=\"docutils literal notranslate\">&lt;pattern&gt;</code> has a <code class=\"docutils literal notranslate\">route</code> that contains\n<code class=\"docutils literal notranslate\">(?P&lt;</code>, begins with a <code class=\"docutils literal notranslate\">^</code>, or ends with a <code class=\"docutils literal notranslate\">$</code>. This was likely an\noversight when migrating from <code class=\"docutils literal notranslate\">url()</code> to <a class=\"reference internal\" href=\"/pl/3.0/ref/urls/#django.urls.path\" title=\"django.urls.path\"><code class=\"xref py py-func docutils literal notranslate\">path()</code></a>.</p></li>\n</ul>\n</section>\n<section id=\"caches\">\n<h3>Caches<a class=\"heading-anchor\" href=\"#caches\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The following checks verify that your <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-CACHES\"><code class=\"xref std std-setting docutils literal notranslate\">CACHES</code></a> setting is correctly\nconfigured:</p>\n<ul class=\"simple\">\n<li><p><strong>caches.E001</strong>: You must define a <code class=\"docutils literal notranslate\">'default'</code> cache in your\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-CACHES\"><code class=\"xref std std-setting docutils literal notranslate\">CACHES</code></a> setting.</p></li>\n</ul>\n</section>\n<section id=\"database\">\n<h3>Database<a class=\"heading-anchor\" href=\"#database\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<section id=\"mysql\">\n<h4>MySQL<a class=\"heading-anchor\" href=\"#mysql\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>If you’re using MySQL, the following checks will be performed:</p>\n<ul class=\"simple\">\n<li><p><strong>mysql.E001</strong>: MySQL does not allow unique <code class=\"docutils literal notranslate\">CharField</code>s to have a\n<code class=\"docutils literal notranslate\">max_length</code> &gt; 255.</p></li>\n<li><p><strong>mysql.W002</strong>: MySQL Strict Mode is not set for database connection\n<code class=\"docutils literal notranslate\">&lt;alias&gt;</code>. See also <a class=\"reference internal\" href=\"/pl/3.0/ref/databases/#mysql-sql-mode\"><span class=\"std std-ref\">Setting sql_mode</span></a>.</p></li>\n</ul>\n</section>\n</section>\n<section id=\"model-fields\">\n<h3>Model fields<a class=\"heading-anchor\" href=\"#model-fields\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><strong>fields.E001</strong>: Field names must not end with an underscore.</p></li>\n<li><p><strong>fields.E002</strong>: Field names must not contain <code class=\"docutils literal notranslate\">&quot;__&quot;</code>.</p></li>\n<li><p><strong>fields.E003</strong>: <code class=\"docutils literal notranslate\">pk</code> is a reserved word that cannot be used as a field\nname.</p></li>\n<li><p><strong>fields.E004</strong>: <code class=\"docutils literal notranslate\">choices</code> must be an iterable (e.g., a list or tuple).</p></li>\n<li><p><strong>fields.E005</strong>: <code class=\"docutils literal notranslate\">choices</code> must be an iterable returning <code class=\"docutils literal notranslate\">(actual value,\nhuman readable name)</code> tuples.</p></li>\n<li><p><strong>fields.E006</strong>: <code class=\"docutils literal notranslate\">db_index</code> must be <code class=\"docutils literal notranslate\">None</code>, <code class=\"docutils literal notranslate\">True</code> or <code class=\"docutils literal notranslate\">False</code>.</p></li>\n<li><p><strong>fields.E007</strong>: Primary keys must not have <code class=\"docutils literal notranslate\">null=True</code>.</p></li>\n<li><p><strong>fields.E008</strong>: All <code class=\"docutils literal notranslate\">validators</code> must be callable.</p></li>\n<li><p><strong>fields.E009</strong>: <code class=\"docutils literal notranslate\">max_length</code> is too small to fit the longest value in\n<code class=\"docutils literal notranslate\">choices</code> (<code class=\"docutils literal notranslate\">&lt;count&gt;</code> characters).</p></li>\n<li><p><strong>fields.E100</strong>: <code class=\"docutils literal notranslate\">AutoField</code>s must set primary_key=True.</p></li>\n<li><p><strong>fields.E110</strong>: <code class=\"docutils literal notranslate\">BooleanField</code>s do not accept null values. <em>This check\nappeared before support for null values was added in Django 2.1.</em></p></li>\n<li><p><strong>fields.E120</strong>: <code class=\"docutils literal notranslate\">CharField</code>s must define a <code class=\"docutils literal notranslate\">max_length</code> attribute.</p></li>\n<li><p><strong>fields.E121</strong>: <code class=\"docutils literal notranslate\">max_length</code> must be a positive integer.</p></li>\n<li><p><strong>fields.W122</strong>: <code class=\"docutils literal notranslate\">max_length</code> is ignored when used with\n<code class=\"docutils literal notranslate\">&lt;integer field type&gt;</code>.</p></li>\n<li><p><strong>fields.E130</strong>: <code class=\"docutils literal notranslate\">DecimalField</code>s must define a <code class=\"docutils literal notranslate\">decimal_places</code> attribute.</p></li>\n<li><p><strong>fields.E131</strong>: <code class=\"docutils literal notranslate\">decimal_places</code> must be a non-negative integer.</p></li>\n<li><p><strong>fields.E132</strong>: <code class=\"docutils literal notranslate\">DecimalField</code>s must define a <code class=\"docutils literal notranslate\">max_digits</code> attribute.</p></li>\n<li><p><strong>fields.E133</strong>: <code class=\"docutils literal notranslate\">max_digits</code> must be a non-negative integer.</p></li>\n<li><p><strong>fields.E134</strong>: <code class=\"docutils literal notranslate\">max_digits</code> must be greater or equal to <code class=\"docutils literal notranslate\">decimal_places</code>.</p></li>\n<li><p><strong>fields.E140</strong>: <code class=\"docutils literal notranslate\">FilePathField</code>s must have either <code class=\"docutils literal notranslate\">allow_files</code> or\n<code class=\"docutils literal notranslate\">allow_folders</code> set to True.</p></li>\n<li><p><strong>fields.E150</strong>: <code class=\"docutils literal notranslate\">GenericIPAddressField</code>s cannot accept blank values if\nnull values are not allowed, as blank values are stored as nulls.</p></li>\n<li><p><strong>fields.E160</strong>: The options <code class=\"docutils literal notranslate\">auto_now</code>, <code class=\"docutils literal notranslate\">auto_now_add</code>, and <code class=\"docutils literal notranslate\">default</code>\nare mutually exclusive. Only one of these options may be present.</p></li>\n<li><p><strong>fields.W161</strong>: Fixed default value provided.</p></li>\n<li><p><strong>fields.W162</strong>: <code class=\"docutils literal notranslate\">&lt;database&gt;</code> does not support a database index on\n<code class=\"docutils literal notranslate\">&lt;field data type&gt;</code> columns.</p></li>\n<li><p><strong>fields.E170</strong>: <code class=\"docutils literal notranslate\">BinaryField</code>’s <code class=\"docutils literal notranslate\">default</code> cannot be a string. Use bytes\ncontent instead.</p></li>\n<li><p><strong>fields.E900</strong>: <code class=\"docutils literal notranslate\">IPAddressField</code> has been removed except for support in\nhistorical migrations.</p></li>\n<li><p><strong>fields.W900</strong>: <code class=\"docutils literal notranslate\">IPAddressField</code> has been deprecated. Support for it\n(except in historical migrations) will be removed in Django 1.9. <em>This check\nappeared in Django 1.7 and 1.8</em>.</p></li>\n<li><p><strong>fields.W901</strong>: <code class=\"docutils literal notranslate\">CommaSeparatedIntegerField</code> has been deprecated. Support\nfor it (except in historical migrations) will be removed in Django 2.0. <em>This\ncheck appeared in Django 1.10 and 1.11</em>.</p></li>\n<li><p><strong>fields.E901</strong>: <code class=\"docutils literal notranslate\">CommaSeparatedIntegerField</code> is removed except for support\nin historical migrations.</p></li>\n<li><p><strong>fields.W902</strong>: <code class=\"docutils literal notranslate\">FloatRangeField</code> is deprecated and will be removed in\nDjango 3.1.</p></li>\n</ul>\n<section id=\"file-fields\">\n<h4>File fields<a class=\"heading-anchor\" href=\"#file-fields\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<ul class=\"simple\">\n<li><p><strong>fields.E200</strong>: <code class=\"docutils literal notranslate\">unique</code> is not a valid argument for a <code class=\"docutils literal notranslate\">FileField</code>.\n<em>This check is removed in Django 1.11</em>.</p></li>\n<li><p><strong>fields.E201</strong>: <code class=\"docutils literal notranslate\">primary_key</code> is not a valid argument for a <code class=\"docutils literal notranslate\">FileField</code>.</p></li>\n<li><p><strong>fields.E202</strong>: <code class=\"docutils literal notranslate\">FileField</code>’s <code class=\"docutils literal notranslate\">upload_to</code> argument must be a relative\npath, not an absolute path.</p></li>\n<li><p><strong>fields.E210</strong>: Cannot use <code class=\"docutils literal notranslate\">ImageField</code> because Pillow is not installed.</p></li>\n</ul>\n</section>\n<section id=\"related-fields\">\n<h4>Related fields<a class=\"heading-anchor\" href=\"#related-fields\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<ul class=\"simple\">\n<li><p><strong>fields.E300</strong>: Field defines a relation with model <code class=\"docutils literal notranslate\">&lt;model&gt;</code>, which is\neither not installed, or is abstract.</p></li>\n<li><p><strong>fields.E301</strong>: Field defines a relation with the model <code class=\"docutils literal notranslate\">&lt;model&gt;</code> which\nhas been swapped out.</p></li>\n<li><p><strong>fields.E302</strong>: Accessor for field <code class=\"docutils literal notranslate\">&lt;field name&gt;</code> clashes with field\n<code class=\"docutils literal notranslate\">&lt;field name&gt;</code>.</p></li>\n<li><p><strong>fields.E303</strong>: Reverse query name for field <code class=\"docutils literal notranslate\">&lt;field name&gt;</code> clashes with\nfield <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>.</p></li>\n<li><p><strong>fields.E304</strong>: Field name <code class=\"docutils literal notranslate\">&lt;field name&gt;</code> clashes with accessor for\n<code class=\"docutils literal notranslate\">&lt;field name&gt;</code>.</p></li>\n<li><p><strong>fields.E305</strong>: Field name <code class=\"docutils literal notranslate\">&lt;field name&gt;</code> clashes with reverse query name\nfor <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>.</p></li>\n<li><p><strong>fields.E306</strong>: Related name must be a valid Python identifier or end with\na <code class=\"docutils literal notranslate\">'+'</code>.</p></li>\n<li><p><strong>fields.E307</strong>: The field <code class=\"docutils literal notranslate\">&lt;app label&gt;.&lt;model&gt;.&lt;field name&gt;</code> was declared\nwith a lazy reference to <code class=\"docutils literal notranslate\">&lt;app label&gt;.&lt;model&gt;</code>, but app <code class=\"docutils literal notranslate\">&lt;app label&gt;</code>\nisn’t installed or doesn’t provide model <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>fields.E308</strong>: Reverse query name <code class=\"docutils literal notranslate\">&lt;related query name&gt;</code> must not end\nwith an underscore.</p></li>\n<li><p><strong>fields.E309</strong>: Reverse query name <code class=\"docutils literal notranslate\">&lt;related query name&gt;</code> must not contain\n<code class=\"docutils literal notranslate\">'__'</code>.</p></li>\n<li><p><strong>fields.E310</strong>: No subset of the fields <code class=\"docutils literal notranslate\">&lt;field1&gt;</code>, <code class=\"docutils literal notranslate\">&lt;field2&gt;</code>, … on\nmodel <code class=\"docutils literal notranslate\">&lt;model&gt;</code> is unique.</p></li>\n<li><p><strong>fields.E311</strong>: <code class=\"docutils literal notranslate\">&lt;model&gt;</code> must set <code class=\"docutils literal notranslate\">unique=True</code> because it is\nreferenced by a <code class=\"docutils literal notranslate\">ForeignKey</code>.</p></li>\n<li><p><strong>fields.E312</strong>: The <code class=\"docutils literal notranslate\">to_field</code> <code class=\"docutils literal notranslate\">&lt;field name&gt;</code> doesn’t exist on the\nrelated model <code class=\"docutils literal notranslate\">&lt;app label&gt;.&lt;model&gt;</code>.</p></li>\n<li><p><strong>fields.E320</strong>: Field specifies <code class=\"docutils literal notranslate\">on_delete=SET_NULL</code>, but cannot be null.</p></li>\n<li><p><strong>fields.E321</strong>: The field specifies <code class=\"docutils literal notranslate\">on_delete=SET_DEFAULT</code>, but has no\ndefault value.</p></li>\n<li><p><strong>fields.E330</strong>: <code class=\"docutils literal notranslate\">ManyToManyField</code>s cannot be unique.</p></li>\n<li><p><strong>fields.E331</strong>: Field specifies a many-to-many relation through model\n<code class=\"docutils literal notranslate\">&lt;model&gt;</code>, which has not been installed.</p></li>\n<li><p><strong>fields.E332</strong>: Many-to-many fields with intermediate tables must not be\nsymmetrical. <em>This check appeared before Django 3.0.</em></p></li>\n<li><p><strong>fields.E333</strong>: The model is used as an intermediate model by <code class=\"docutils literal notranslate\">&lt;model&gt;</code>,\nbut it has more than two foreign keys to <code class=\"docutils literal notranslate\">&lt;model&gt;</code>, which is ambiguous.\nYou must specify which two foreign keys Django should use via the\n<code class=\"docutils literal notranslate\">through_fields</code> keyword argument.</p></li>\n<li><p><strong>fields.E334</strong>: The model is used as an intermediate model by <code class=\"docutils literal notranslate\">&lt;model&gt;</code>,\nbut it has more than one foreign key from <code class=\"docutils literal notranslate\">&lt;model&gt;</code>, which is ambiguous.\nYou must specify which foreign key Django should use via the\n<code class=\"docutils literal notranslate\">through_fields</code> keyword argument.</p></li>\n<li><p><strong>fields.E335</strong>: The model is used as an intermediate model by <code class=\"docutils literal notranslate\">&lt;model&gt;</code>,\nbut it has more than one foreign key to <code class=\"docutils literal notranslate\">&lt;model&gt;</code>, which is ambiguous.\nYou must specify which foreign key Django should use via the\n<code class=\"docutils literal notranslate\">through_fields</code> keyword argument.</p></li>\n<li><p><strong>fields.E336</strong>: The model is used as an intermediary model by <code class=\"docutils literal notranslate\">&lt;model&gt;</code>,\nbut it does not have foreign key to <code class=\"docutils literal notranslate\">&lt;model&gt;</code> or <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>fields.E337</strong>: Field specifies <code class=\"docutils literal notranslate\">through_fields</code> but does not provide the\nnames of the two link fields that should be used for the relation through\n<code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>fields.E338</strong>: The intermediary model <code class=\"docutils literal notranslate\">&lt;through model&gt;</code> has no field\n<code class=\"docutils literal notranslate\">&lt;field name&gt;</code>.</p></li>\n<li><p><strong>fields.E339</strong>: <code class=\"docutils literal notranslate\">&lt;model&gt;.&lt;field name&gt;</code> is not a foreign key to <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>fields.E340</strong>: The field’s intermediary table <code class=\"docutils literal notranslate\">&lt;table name&gt;</code> clashes with\nthe table name of <code class=\"docutils literal notranslate\">&lt;model&gt;</code>/<code class=\"docutils literal notranslate\">&lt;model&gt;.&lt;field name&gt;</code>.</p></li>\n<li><p><strong>fields.W340</strong>: <code class=\"docutils literal notranslate\">null</code> has no effect on <code class=\"docutils literal notranslate\">ManyToManyField</code>.</p></li>\n<li><p><strong>fields.W341</strong>: <code class=\"docutils literal notranslate\">ManyToManyField</code> does not support <code class=\"docutils literal notranslate\">validators</code>.</p></li>\n<li><p><strong>fields.W342</strong>: Setting <code class=\"docutils literal notranslate\">unique=True</code> on a <code class=\"docutils literal notranslate\">ForeignKey</code> has the same\neffect as using a <code class=\"docutils literal notranslate\">OneToOneField</code>.</p></li>\n<li><p><strong>fields.W343</strong>: <code class=\"docutils literal notranslate\">limit_choices_to</code> has no effect on <code class=\"docutils literal notranslate\">ManyToManyField</code>\nwith a <code class=\"docutils literal notranslate\">through</code> model.</p></li>\n</ul>\n</section>\n</section>\n<section id=\"models\">\n<h3>Models<a class=\"heading-anchor\" href=\"#models\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><strong>models.E001</strong>: <code class=\"docutils literal notranslate\">&lt;swappable&gt;</code> is not of the form <code class=\"docutils literal notranslate\">app_label.app_name</code>.</p></li>\n<li><p><strong>models.E002</strong>: <code class=\"docutils literal notranslate\">&lt;SETTING&gt;</code> references <code class=\"docutils literal notranslate\">&lt;model&gt;</code>, which has not been\ninstalled, or is abstract.</p></li>\n<li><p><strong>models.E003</strong>: The model has two identical many-to-many relations through\nthe intermediate model <code class=\"docutils literal notranslate\">&lt;app_label&gt;.&lt;model&gt;</code>.</p></li>\n<li><p><strong>models.E004</strong>: <code class=\"docutils literal notranslate\">id</code> can only be used as a field name if the field also\nsets <code class=\"docutils literal notranslate\">primary_key=True</code>.</p></li>\n<li><p><strong>models.E005</strong>: The field <code class=\"docutils literal notranslate\">&lt;field name&gt;</code> from parent model <code class=\"docutils literal notranslate\">&lt;model&gt;</code>\nclashes with the field <code class=\"docutils literal notranslate\">&lt;field name&gt;</code> from parent model <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>models.E006</strong>: The field clashes with the field <code class=\"docutils literal notranslate\">&lt;field name&gt;</code> from model\n<code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>models.E007</strong>: Field <code class=\"docutils literal notranslate\">&lt;field name&gt;</code> has column name <code class=\"docutils literal notranslate\">&lt;column name&gt;</code>\nthat is used by another field.</p></li>\n<li><p><strong>models.E008</strong>: <code class=\"docutils literal notranslate\">index_together</code> must be a list or tuple.</p></li>\n<li><p><strong>models.E009</strong>: All <code class=\"docutils literal notranslate\">index_together</code> elements must be lists or tuples.</p></li>\n<li><p><strong>models.E010</strong>: <code class=\"docutils literal notranslate\">unique_together</code> must be a list or tuple.</p></li>\n<li><p><strong>models.E011</strong>: All <code class=\"docutils literal notranslate\">unique_together</code> elements must be lists or tuples.</p></li>\n<li><p><strong>models.E012</strong>: <code class=\"docutils literal notranslate\">indexes/index_together/unique_together</code> refers to the\nnonexistent field <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>.</p></li>\n<li><p><strong>models.E013</strong>: <code class=\"docutils literal notranslate\">indexes/index_together/unique_together</code> refers to a\n<code class=\"docutils literal notranslate\">ManyToManyField</code> <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>, but <code class=\"docutils literal notranslate\">ManyToManyField</code>s are not\nsupported for that option.</p></li>\n<li><p><strong>models.E014</strong>: <code class=\"docutils literal notranslate\">ordering</code> must be a tuple or list (even if you want to\norder by only one field).</p></li>\n<li><p><strong>models.E015</strong>: <code class=\"docutils literal notranslate\">ordering</code> refers to the nonexistent field, related field,\nor lookup <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>.</p></li>\n<li><p><strong>models.E016</strong>: <code class=\"docutils literal notranslate\">indexes/index_together/unique_together</code> refers to field\n<code class=\"docutils literal notranslate\">&lt;field_name&gt;</code> which is not local to model <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>models.E017</strong>: Proxy model <code class=\"docutils literal notranslate\">&lt;model&gt;</code> contains model fields.</p></li>\n<li><p><strong>models.E018</strong>: Autogenerated column name too long for field <code class=\"docutils literal notranslate\">&lt;field&gt;</code>.\nMaximum length is <code class=\"docutils literal notranslate\">&lt;maximum length&gt;</code> for database <code class=\"docutils literal notranslate\">&lt;alias&gt;</code>.</p></li>\n<li><p><strong>models.E019</strong>: Autogenerated column name too long for M2M field\n<code class=\"docutils literal notranslate\">&lt;M2M field&gt;</code>. Maximum length is <code class=\"docutils literal notranslate\">&lt;maximum length&gt;</code> for database\n<code class=\"docutils literal notranslate\">&lt;alias&gt;</code>.</p></li>\n<li><p><strong>models.E020</strong>: The <code class=\"docutils literal notranslate\">&lt;model&gt;.check()</code> class method is currently overridden.</p></li>\n<li><p><strong>models.E021</strong>: <code class=\"docutils literal notranslate\">ordering</code> and <code class=\"docutils literal notranslate\">order_with_respect_to</code> cannot be used\ntogether.</p></li>\n<li><p><strong>models.E022</strong>: <code class=\"docutils literal notranslate\">&lt;function&gt;</code> contains a lazy reference to\n<code class=\"docutils literal notranslate\">&lt;app label&gt;.&lt;model&gt;</code>, but app <code class=\"docutils literal notranslate\">&lt;app label&gt;</code> isn’t installed or\ndoesn’t provide model <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>models.E023</strong>: The model name <code class=\"docutils literal notranslate\">&lt;model&gt;</code> cannot start or end with an\nunderscore as it collides with the query lookup syntax.</p></li>\n<li><p><strong>models.E024</strong>: The model name <code class=\"docutils literal notranslate\">&lt;model&gt;</code> cannot contain double underscores\nas it collides with the query lookup syntax.</p></li>\n<li><p><strong>models.E025</strong>: The property <code class=\"docutils literal notranslate\">&lt;property name&gt;</code> clashes with a related\nfield accessor.</p></li>\n<li><p><strong>models.E026</strong>: The model cannot have more than one field with\n<code class=\"docutils literal notranslate\">primary_key=True</code>.</p></li>\n<li><p><strong>models.W027</strong>: <code class=\"docutils literal notranslate\">&lt;database&gt;</code> does not support check constraints.</p></li>\n<li><p><strong>models.E028</strong>: <code class=\"docutils literal notranslate\">db_table</code> <code class=\"docutils literal notranslate\">&lt;db_table&gt;</code> is used by multiple models:\n<code class=\"docutils literal notranslate\">&lt;model list&gt;</code>.</p></li>\n<li><p><strong>models.E029</strong>: index name <code class=\"docutils literal notranslate\">&lt;index&gt;</code> is not unique for model <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>models.E030</strong>: index name <code class=\"docutils literal notranslate\">&lt;index&gt;</code> is not unique amongst models:\n<code class=\"docutils literal notranslate\">&lt;model list&gt;</code>.</p></li>\n<li><p><strong>models.E031</strong>: constraint name <code class=\"docutils literal notranslate\">&lt;constraint&gt;</code> is not unique for model\n<code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>models.E032</strong>: constraint name <code class=\"docutils literal notranslate\">&lt;constraint&gt;</code> is not unique amongst\nmodels: <code class=\"docutils literal notranslate\">&lt;model list&gt;</code>.</p></li>\n<li><p><strong>models.E033</strong>: The index name <code class=\"docutils literal notranslate\">&lt;index&gt;</code> cannot start with an underscore\nor a number.</p></li>\n<li><p><strong>models.E034</strong>: The index name <code class=\"docutils literal notranslate\">&lt;index&gt;</code> cannot be longer than\n<code class=\"docutils literal notranslate\">&lt;max_length&gt;</code> characters.</p></li>\n<li><p><strong>models.W035</strong>: <code class=\"docutils literal notranslate\">db_table</code> <code class=\"docutils literal notranslate\">&lt;db_table&gt;</code> is used by multiple models:\n<code class=\"docutils literal notranslate\">&lt;model list&gt;</code>.</p></li>\n</ul>\n</section>\n<section id=\"security\">\n<h3>Security<a class=\"heading-anchor\" href=\"#security\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The security checks do not make your site secure. They do not audit code, do\nintrusion detection, or do anything particularly complex. Rather, they help\nperform an automated, low-hanging-fruit checklist, that can help you to improve\nyour site’s security.</p>\n<p>Some of these checks may not be appropriate for your particular deployment\nconfiguration. For instance, if you do your HTTP to HTTPS redirection in a load\nbalancer, it’d be irritating to be constantly warned about not having enabled\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_SSL_REDIRECT\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_SSL_REDIRECT</code></a>. Use <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SILENCED_SYSTEM_CHECKS\"><code class=\"xref std std-setting docutils literal notranslate\">SILENCED_SYSTEM_CHECKS</code></a> to\nsilence unneeded checks.</p>\n<p>The following checks are run if you use the <a class=\"reference internal\" href=\"/pl/3.0/ref/django-admin/#cmdoption-check-deploy\"><code class=\"xref std std-option docutils literal notranslate\">check --deploy</code></a> option:</p>\n<ul class=\"simple\">\n<li><p><strong>security.W001</strong>: You do not have\n<a class=\"reference internal\" href=\"/pl/3.0/ref/middleware/#django.middleware.security.SecurityMiddleware\" title=\"django.middleware.security.SecurityMiddleware\"><code class=\"xref py py-class docutils literal notranslate\">django.middleware.security.SecurityMiddleware</code></a> in your\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\">MIDDLEWARE</code></a> so the <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_HSTS_SECONDS\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_HSTS_SECONDS</code></a>,\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_CONTENT_TYPE_NOSNIFF\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_CONTENT_TYPE_NOSNIFF</code></a>, <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_BROWSER_XSS_FILTER\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_BROWSER_XSS_FILTER</code></a>,\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_REFERRER_POLICY\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_REFERRER_POLICY</code></a>, and <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_SSL_REDIRECT\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_SSL_REDIRECT</code></a>\nsettings will have no effect.</p></li>\n<li><p><strong>security.W002</strong>: You do not have\n<a class=\"reference internal\" href=\"/pl/3.0/ref/middleware/#django.middleware.clickjacking.XFrameOptionsMiddleware\" title=\"django.middleware.clickjacking.XFrameOptionsMiddleware\"><code class=\"xref py py-class docutils literal notranslate\">django.middleware.clickjacking.XFrameOptionsMiddleware</code></a> in your\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\">MIDDLEWARE</code></a>, so your pages will not be served with an\n<code class=\"docutils literal notranslate\">'x-frame-options'</code> header. Unless there is a good reason for your\nsite to be served in a frame, you should consider enabling this\nheader to help prevent clickjacking attacks.</p></li>\n<li><p><strong>security.W003</strong>: You don’t appear to be using Django’s built-in cross-site\nrequest forgery protection via the middleware\n(<a class=\"reference internal\" href=\"/pl/3.0/ref/middleware/#django.middleware.csrf.CsrfViewMiddleware\" title=\"django.middleware.csrf.CsrfViewMiddleware\"><code class=\"xref py py-class docutils literal notranslate\">django.middleware.csrf.CsrfViewMiddleware</code></a> is not in your\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\">MIDDLEWARE</code></a>). Enabling the middleware is the safest\napproach to ensure you don’t leave any holes.</p></li>\n<li><p><strong>security.W004</strong>: You have not set a value for the\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_HSTS_SECONDS\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_HSTS_SECONDS</code></a> setting. If your entire site is served only\nover SSL, you may want to consider setting a value and enabling <a class=\"reference internal\" href=\"/pl/3.0/ref/middleware/#http-strict-transport-security\"><span class=\"std std-ref\">HTTP\nStrict Transport Security</span></a>. Be sure to read\nthe documentation first; enabling HSTS carelessly can cause serious,\nirreversible problems.</p></li>\n<li><p><strong>security.W005</strong>: You have not set the\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_HSTS_INCLUDE_SUBDOMAINS\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_HSTS_INCLUDE_SUBDOMAINS</code></a> setting to <code class=\"docutils literal notranslate\">True</code>. Without this,\nyour site is potentially vulnerable to attack via an insecure connection to a\nsubdomain. Only set this to <code class=\"docutils literal notranslate\">True</code> if you are certain that all subdomains of\nyour domain should be served exclusively via SSL.</p></li>\n<li><p><strong>security.W006</strong>: Your <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_CONTENT_TYPE_NOSNIFF\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_CONTENT_TYPE_NOSNIFF</code></a> setting is not\nset to <code class=\"docutils literal notranslate\">True</code>, so your pages will not be served with an\n<code class=\"docutils literal notranslate\">'X-Content-Type-Options: nosniff'</code> header. You should consider enabling\nthis header to prevent the browser from identifying content types incorrectly.</p></li>\n<li><p><strong>security.W007</strong>: Your <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_BROWSER_XSS_FILTER\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_BROWSER_XSS_FILTER</code></a> setting is not\nset to <code class=\"docutils literal notranslate\">True</code>, so your pages will not be served with an\n<code class=\"docutils literal notranslate\">'X-XSS-Protection: 1; mode=block'</code> header. You should consider enabling\nthis header to activate the browser’s XSS filtering and help prevent XSS\nattacks. <em>This check is removed in Django 3.0 as the</em> <code class=\"docutils literal notranslate\">X-XSS-Protection</code>\n<em>header is no longer honored by modern browsers.</em></p></li>\n<li><p><strong>security.W008</strong>: Your <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_SSL_REDIRECT\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_SSL_REDIRECT</code></a> setting is not set to\n<code class=\"docutils literal notranslate\">True</code>. Unless your site should be available over both SSL and non-SSL\nconnections, you may want to either set this setting to <code class=\"docutils literal notranslate\">True</code> or configure\na load balancer or reverse-proxy server  to redirect all connections to HTTPS.</p></li>\n<li><p><strong>security.W009</strong>: Your <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECRET_KEY\"><code class=\"xref std std-setting docutils literal notranslate\">SECRET_KEY</code></a> has less than 50 characters or\nless than 5 unique characters. Please generate a long and random\n<code class=\"docutils literal notranslate\">SECRET_KEY</code>, otherwise many of Django’s security-critical features will be\nvulnerable to attack.</p></li>\n<li><p><strong>security.W010</strong>: You have <a class=\"reference internal\" href=\"/pl/3.0/topics/http/sessions/#module-django.contrib.sessions\" title=\"django.contrib.sessions: Provides session management for Django projects.\"><code class=\"xref py py-mod docutils literal notranslate\">django.contrib.sessions</code></a> in your\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\">INSTALLED_APPS</code></a> but you have not set\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SESSION_COOKIE_SECURE\"><code class=\"xref std std-setting docutils literal notranslate\">SESSION_COOKIE_SECURE</code></a> to <code class=\"docutils literal notranslate\">True</code>. Using a secure-only session\ncookie makes it more difficult for network traffic sniffers to hijack user\nsessions.</p></li>\n<li><p><strong>security.W011</strong>: You have\n<a class=\"reference internal\" href=\"/pl/3.0/ref/middleware/#django.contrib.sessions.middleware.SessionMiddleware\" title=\"django.contrib.sessions.middleware.SessionMiddleware\"><code class=\"xref py py-class docutils literal notranslate\">django.contrib.sessions.middleware.SessionMiddleware</code></a> in your\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\">MIDDLEWARE</code></a>, but you have not set <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SESSION_COOKIE_SECURE\"><code class=\"xref std std-setting docutils literal notranslate\">SESSION_COOKIE_SECURE</code></a>\nto <code class=\"docutils literal notranslate\">True</code>. Using a secure-only session cookie makes it more difficult for\nnetwork traffic sniffers to hijack user sessions.</p></li>\n<li><p><strong>security.W012</strong>: <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SESSION_COOKIE_SECURE\"><code class=\"xref std std-setting docutils literal notranslate\">SESSION_COOKIE_SECURE</code></a> is not set to <code class=\"docutils literal notranslate\">True</code>.\nUsing a secure-only session cookie makes it more difficult for network traffic\nsniffers to hijack user sessions.</p></li>\n<li><p><strong>security.W013</strong>: You have <a class=\"reference internal\" href=\"/pl/3.0/topics/http/sessions/#module-django.contrib.sessions\" title=\"django.contrib.sessions: Provides session management for Django projects.\"><code class=\"xref py py-mod docutils literal notranslate\">django.contrib.sessions</code></a> in your\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\">INSTALLED_APPS</code></a>, but you have not set\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SESSION_COOKIE_HTTPONLY\"><code class=\"xref std std-setting docutils literal notranslate\">SESSION_COOKIE_HTTPONLY</code></a> to <code class=\"docutils literal notranslate\">True</code>. Using an <code class=\"docutils literal notranslate\">HttpOnly</code> session\ncookie makes it more difficult for cross-site scripting attacks to hijack user\nsessions.</p></li>\n<li><p><strong>security.W014</strong>: You have\n<a class=\"reference internal\" href=\"/pl/3.0/ref/middleware/#django.contrib.sessions.middleware.SessionMiddleware\" title=\"django.contrib.sessions.middleware.SessionMiddleware\"><code class=\"xref py py-class docutils literal notranslate\">django.contrib.sessions.middleware.SessionMiddleware</code></a> in your\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\">MIDDLEWARE</code></a>, but you have not set <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SESSION_COOKIE_HTTPONLY\"><code class=\"xref std std-setting docutils literal notranslate\">SESSION_COOKIE_HTTPONLY</code></a>\nto <code class=\"docutils literal notranslate\">True</code>. Using an <code class=\"docutils literal notranslate\">HttpOnly</code> session cookie makes it more difficult for\ncross-site scripting attacks to hijack user sessions.</p></li>\n<li><p><strong>security.W015</strong>: <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SESSION_COOKIE_HTTPONLY\"><code class=\"xref std std-setting docutils literal notranslate\">SESSION_COOKIE_HTTPONLY</code></a> is not set to <code class=\"docutils literal notranslate\">True</code>.\nUsing an <code class=\"docutils literal notranslate\">HttpOnly</code> session cookie makes it more difficult for cross-site\nscripting attacks to hijack user sessions.</p></li>\n<li><p><strong>security.W016</strong>: <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-CSRF_COOKIE_SECURE\"><code class=\"xref std std-setting docutils literal notranslate\">CSRF_COOKIE_SECURE</code></a> is not set to <code class=\"docutils literal notranslate\">True</code>.\nUsing a secure-only CSRF cookie makes it more difficult for network traffic\nsniffers to steal the CSRF token.</p></li>\n<li><p><strong>security.W017</strong>: <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-CSRF_COOKIE_HTTPONLY\"><code class=\"xref std std-setting docutils literal notranslate\">CSRF_COOKIE_HTTPONLY</code></a> is not set to <code class=\"docutils literal notranslate\">True</code>.\nUsing an <code class=\"docutils literal notranslate\">HttpOnly</code> CSRF cookie makes it more difficult for cross-site\nscripting attacks to steal the CSRF token. <em>This check is removed in Django\n1.11 as the</em> <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-CSRF_COOKIE_HTTPONLY\"><code class=\"xref std std-setting docutils literal notranslate\">CSRF_COOKIE_HTTPONLY</code></a> <em>setting offers no practical\nbenefit.</em></p></li>\n<li><p><strong>security.W018</strong>: You should not have <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-DEBUG\"><code class=\"xref std std-setting docutils literal notranslate\">DEBUG</code></a> set to <code class=\"docutils literal notranslate\">True</code> in\ndeployment.</p></li>\n<li><p><strong>security.W019</strong>: You have\n<a class=\"reference internal\" href=\"/pl/3.0/ref/middleware/#django.middleware.clickjacking.XFrameOptionsMiddleware\" title=\"django.middleware.clickjacking.XFrameOptionsMiddleware\"><code class=\"xref py py-class docutils literal notranslate\">django.middleware.clickjacking.XFrameOptionsMiddleware</code></a> in your\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\">MIDDLEWARE</code></a>, but <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-X_FRAME_OPTIONS\"><code class=\"xref std std-setting docutils literal notranslate\">X_FRAME_OPTIONS</code></a> is not set to\n<code class=\"docutils literal notranslate\">'DENY'</code>. Unless there is a good reason for your site to serve other parts\nof itself in a frame, you should change it to <code class=\"docutils literal notranslate\">'DENY'</code>.</p></li>\n<li><p><strong>security.W020</strong>: <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-ALLOWED_HOSTS\"><code class=\"xref std std-setting docutils literal notranslate\">ALLOWED_HOSTS</code></a> must not be empty in deployment.</p></li>\n<li><p><strong>security.W021</strong>: You have not set the\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_HSTS_PRELOAD\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_HSTS_PRELOAD</code></a> setting to <code class=\"docutils literal notranslate\">True</code>. Without this, your site\ncannot be submitted to the browser preload list.</p></li>\n<li><p><strong>security.W022</strong>: You have not set the <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_REFERRER_POLICY\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_REFERRER_POLICY</code></a>\nsetting. Without this, your site will not send a Referrer-Policy header. You\nshould consider enabling this header to protect user privacy.</p></li>\n<li><p><strong>security.E023</strong>: You have set the <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-SECURE_REFERRER_POLICY\"><code class=\"xref std std-setting docutils literal notranslate\">SECURE_REFERRER_POLICY</code></a> setting\nto an invalid value.</p></li>\n</ul>\n</section>\n<section id=\"signals\">\n<h3>Signals<a class=\"heading-anchor\" href=\"#signals\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><strong>signals.E001</strong>: <code class=\"docutils literal notranslate\">&lt;handler&gt;</code> was connected to the <code class=\"docutils literal notranslate\">&lt;signal&gt;</code> signal with\na lazy reference to the sender <code class=\"docutils literal notranslate\">&lt;app label&gt;.&lt;model&gt;</code>, but app <code class=\"docutils literal notranslate\">&lt;app label&gt;</code>\nisn’t installed or doesn’t provide model <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n</ul>\n</section>\n<section id=\"templates\">\n<h3>Templates<a class=\"heading-anchor\" href=\"#templates\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The following checks verify that your <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-TEMPLATES\"><code class=\"xref std std-setting docutils literal notranslate\">TEMPLATES</code></a> setting is correctly\nconfigured:</p>\n<ul class=\"simple\">\n<li><p><strong>templates.E001</strong>: You have <code class=\"docutils literal notranslate\">'APP_DIRS': True</code> in your\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-TEMPLATES\"><code class=\"xref std std-setting docutils literal notranslate\">TEMPLATES</code></a> but also specify <code class=\"docutils literal notranslate\">'loaders'</code> in <code class=\"docutils literal notranslate\">OPTIONS</code>. Either\nremove <code class=\"docutils literal notranslate\">APP_DIRS</code> or remove the <code class=\"docutils literal notranslate\">'loaders'</code> option.</p></li>\n<li><p><strong>templates.E002</strong>: <code class=\"docutils literal notranslate\">string_if_invalid</code> in <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-TEMPLATES\"><code class=\"xref std std-setting docutils literal notranslate\">TEMPLATES</code></a>\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-TEMPLATES-OPTIONS\"><code class=\"xref std std-setting docutils literal notranslate\">OPTIONS</code></a> must be a string but got: <code class=\"docutils literal notranslate\">{value}</code>\n(<code class=\"docutils literal notranslate\">{type}</code>).</p></li>\n</ul>\n</section>\n<section id=\"translation\">\n<h3>Translation<a class=\"heading-anchor\" href=\"#translation\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The following checks are performed on your translation configuration:</p>\n<ul class=\"simple\">\n<li><p><strong>translation.E001</strong>: You have provided an invalid value for the\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-LANGUAGE_CODE\"><code class=\"xref std std-setting docutils literal notranslate\">LANGUAGE_CODE</code></a> setting: <code class=\"docutils literal notranslate\">&lt;value&gt;</code>.</p></li>\n<li><p><strong>translation.E002</strong>: You have provided an invalid language code in the\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-LANGUAGES\"><code class=\"xref std std-setting docutils literal notranslate\">LANGUAGES</code></a> setting: <code class=\"docutils literal notranslate\">&lt;value&gt;</code>.</p></li>\n<li><p><strong>translation.E003</strong>: You have provided an invalid language code in the\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-LANGUAGES_BIDI\"><code class=\"xref std std-setting docutils literal notranslate\">LANGUAGES_BIDI</code></a> setting: <code class=\"docutils literal notranslate\">&lt;value&gt;</code>.</p></li>\n<li><p><strong>translation.E004</strong>: You have provided a value for the\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-LANGUAGE_CODE\"><code class=\"xref std std-setting docutils literal notranslate\">LANGUAGE_CODE</code></a> setting that is not in the <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-LANGUAGES\"><code class=\"xref std std-setting docutils literal notranslate\">LANGUAGES</code></a>\nsetting.</p></li>\n</ul>\n</section>\n<section id=\"urls\">\n<h3>URLs<a class=\"heading-anchor\" href=\"#urls\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The following checks are performed on your URL configuration:</p>\n<ul class=\"simple\">\n<li><p><strong>urls.W001</strong>: Your URL pattern <code class=\"docutils literal notranslate\">&lt;pattern&gt;</code> uses\n<a class=\"reference internal\" href=\"/pl/3.0/ref/urls/#django.urls.include\" title=\"django.urls.include\"><code class=\"xref py py-func docutils literal notranslate\">include()</code></a> with a <code class=\"docutils literal notranslate\">route</code> ending with a <code class=\"docutils literal notranslate\">$</code>. Remove the\ndollar from the <code class=\"docutils literal notranslate\">route</code> to avoid problems including URLs.</p></li>\n<li><p><strong>urls.W002</strong>: Your URL pattern <code class=\"docutils literal notranslate\">&lt;pattern&gt;</code> has a <code class=\"docutils literal notranslate\">route</code> beginning with\na <code class=\"docutils literal notranslate\">/</code>. Remove this slash as it is unnecessary. If this pattern is targeted\nin an <a class=\"reference internal\" href=\"/pl/3.0/ref/urls/#django.urls.include\" title=\"django.urls.include\"><code class=\"xref py py-func docutils literal notranslate\">include()</code></a>, ensure the <a class=\"reference internal\" href=\"/pl/3.0/ref/urls/#django.urls.include\" title=\"django.urls.include\"><code class=\"xref py py-func docutils literal notranslate\">include()</code></a>\npattern has a trailing <code class=\"docutils literal notranslate\">/</code>.</p></li>\n<li><p><strong>urls.W003</strong>: Your URL pattern <code class=\"docutils literal notranslate\">&lt;pattern&gt;</code> has a <code class=\"docutils literal notranslate\">name</code>\nincluding a <code class=\"docutils literal notranslate\">:</code>. Remove the colon, to avoid ambiguous namespace\nreferences.</p></li>\n<li><p><strong>urls.E004</strong>: Your URL pattern <code class=\"docutils literal notranslate\">&lt;pattern&gt;</code> is invalid. Ensure that\n<code class=\"docutils literal notranslate\">urlpatterns</code> is a list of <a class=\"reference internal\" href=\"/pl/3.0/ref/urls/#django.urls.path\" title=\"django.urls.path\"><code class=\"xref py py-func docutils literal notranslate\">path()</code></a> and/or\n<a class=\"reference internal\" href=\"/pl/3.0/ref/urls/#django.urls.re_path\" title=\"django.urls.re_path\"><code class=\"xref py py-func docutils literal notranslate\">re_path()</code></a> instances.</p></li>\n<li><p><strong>urls.W005</strong>: URL namespace <code class=\"docutils literal notranslate\">&lt;namespace&gt;</code> isn’t unique. You may not be\nable to reverse all URLs in this namespace.</p></li>\n<li><p><strong>urls.E006</strong>: The <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-MEDIA_URL\"><code class=\"xref std std-setting docutils literal notranslate\">MEDIA_URL</code></a>/ <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-STATIC_URL\"><code class=\"xref std std-setting docutils literal notranslate\">STATIC_URL</code></a> setting must\nend with a slash.</p></li>\n<li><p><strong>urls.E007</strong>: The custom <code class=\"docutils literal notranslate\">handlerXXX</code> view <code class=\"docutils literal notranslate\">'path.to.view'</code> does not\ntake the correct number of arguments (…).</p></li>\n<li><p><strong>urls.E008</strong>: The custom <code class=\"docutils literal notranslate\">handlerXXX</code> view <code class=\"docutils literal notranslate\">'path.to.view'</code> could not be\nimported.</p></li>\n</ul>\n</section>\n</section>\n<section id=\"contrib-app-checks\">\n<h2><code class=\"docutils literal notranslate\">contrib</code> app checks<a class=\"heading-anchor\" href=\"#contrib-app-checks\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<section id=\"admin\">\n<h3><code class=\"docutils literal notranslate\">admin</code><a class=\"heading-anchor\" href=\"#admin\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>Admin checks are all performed as part of the <code class=\"docutils literal notranslate\">admin</code> tag.</p>\n<p>The following checks are performed on any\n<a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin\" title=\"django.contrib.admin.ModelAdmin\"><code class=\"xref py py-class docutils literal notranslate\">ModelAdmin</code></a> (or subclass) that is registered\nwith the admin site:</p>\n<ul class=\"simple\">\n<li><p><strong>admin.E001</strong>: The value of <code class=\"docutils literal notranslate\">raw_id_fields</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E002</strong>: The value of <code class=\"docutils literal notranslate\">raw_id_fields[n]</code> refers to <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>,\nwhich is not an attribute of <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E003</strong>: The value of <code class=\"docutils literal notranslate\">raw_id_fields[n]</code> must be a foreign key or\na many-to-many field.</p></li>\n<li><p><strong>admin.E004</strong>: The value of <code class=\"docutils literal notranslate\">fields</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E005</strong>: Both <code class=\"docutils literal notranslate\">fieldsets</code> and <code class=\"docutils literal notranslate\">fields</code> are specified.</p></li>\n<li><p><strong>admin.E006</strong>: The value of <code class=\"docutils literal notranslate\">fields</code> contains duplicate field(s).</p></li>\n<li><p><strong>admin.E007</strong>: The value of <code class=\"docutils literal notranslate\">fieldsets</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E008</strong>: The value of <code class=\"docutils literal notranslate\">fieldsets[n]</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E009</strong>: The value of <code class=\"docutils literal notranslate\">fieldsets[n]</code> must be of length 2.</p></li>\n<li><p><strong>admin.E010</strong>: The value of <code class=\"docutils literal notranslate\">fieldsets[n][1]</code> must be a dictionary.</p></li>\n<li><p><strong>admin.E011</strong>: The value of <code class=\"docutils literal notranslate\">fieldsets[n][1]</code> must contain the key\n<code class=\"docutils literal notranslate\">fields</code>.</p></li>\n<li><p><strong>admin.E012</strong>: There are duplicate field(s) in <code class=\"docutils literal notranslate\">fieldsets[n][1]</code>.</p></li>\n<li><p><strong>admin.E013</strong>: <code class=\"docutils literal notranslate\">fields[n]/fieldsets[n][m]</code> cannot include the\n<code class=\"docutils literal notranslate\">ManyToManyField</code> <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>, because that field manually specifies a\nrelationship model.</p></li>\n<li><p><strong>admin.E014</strong>: The value of <code class=\"docutils literal notranslate\">exclude</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E015</strong>: The value of <code class=\"docutils literal notranslate\">exclude</code> contains duplicate field(s).</p></li>\n<li><p><strong>admin.E016</strong>: The value of <code class=\"docutils literal notranslate\">form</code> must inherit from <code class=\"docutils literal notranslate\">BaseModelForm</code>.</p></li>\n<li><p><strong>admin.E017</strong>: The value of <code class=\"docutils literal notranslate\">filter_vertical</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E018</strong>: The value of <code class=\"docutils literal notranslate\">filter_horizontal</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E019</strong>: The value of <code class=\"docutils literal notranslate\">filter_vertical[n]/filter_vertical[n]</code> refers\nto <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>, which is not an attribute of <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E020</strong>: The value of <code class=\"docutils literal notranslate\">filter_vertical[n]/filter_vertical[n]</code> must\nbe a many-to-many field.</p></li>\n<li><p><strong>admin.E021</strong>: The value of <code class=\"docutils literal notranslate\">radio_fields</code> must be a dictionary.</p></li>\n<li><p><strong>admin.E022</strong>: The value of <code class=\"docutils literal notranslate\">radio_fields</code> refers to <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>,\nwhich is not an attribute of <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E023</strong>: The value of <code class=\"docutils literal notranslate\">radio_fields</code> refers to <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>,\nwhich is not a <code class=\"docutils literal notranslate\">ForeignKey</code>, and does not have a <code class=\"docutils literal notranslate\">choices</code> definition.</p></li>\n<li><p><strong>admin.E024</strong>: The value of <code class=\"docutils literal notranslate\">radio_fields[&lt;field name&gt;]</code> must be either\n<code class=\"docutils literal notranslate\">admin.HORIZONTAL</code> or <code class=\"docutils literal notranslate\">admin.VERTICAL</code>.</p></li>\n<li><p><strong>admin.E025</strong>: The value of <code class=\"docutils literal notranslate\">view_on_site</code> must be either a callable or a\nboolean value.</p></li>\n<li><p><strong>admin.E026</strong>: The value of <code class=\"docutils literal notranslate\">prepopulated_fields</code> must be a dictionary.</p></li>\n<li><p><strong>admin.E027</strong>: The value of <code class=\"docutils literal notranslate\">prepopulated_fields</code> refers to\n<code class=\"docutils literal notranslate\">&lt;field name&gt;</code>, which is not an attribute of <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E028</strong>: The value of <code class=\"docutils literal notranslate\">prepopulated_fields</code> refers to\n<code class=\"docutils literal notranslate\">&lt;field name&gt;</code>, which must not be a <code class=\"docutils literal notranslate\">DateTimeField</code>, a <code class=\"docutils literal notranslate\">ForeignKey</code>,\na <code class=\"docutils literal notranslate\">OneToOneField</code>, or a <code class=\"docutils literal notranslate\">ManyToManyField</code> field.</p></li>\n<li><p><strong>admin.E029</strong>: The value of <code class=\"docutils literal notranslate\">prepopulated_fields[&lt;field name&gt;]</code> must be a\nlist or tuple.</p></li>\n<li><p><strong>admin.E030</strong>: The value of <code class=\"docutils literal notranslate\">prepopulated_fields</code> refers to\n<code class=\"docutils literal notranslate\">&lt;field name&gt;</code>, which is not an attribute of <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E031</strong>: The value of <code class=\"docutils literal notranslate\">ordering</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E032</strong>: The value of <code class=\"docutils literal notranslate\">ordering</code> has the random ordering marker\n<code class=\"docutils literal notranslate\">?</code>, but contains other fields as well.</p></li>\n<li><p><strong>admin.E033</strong>: The value of <code class=\"docutils literal notranslate\">ordering</code> refers to <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>, which\nis not an attribute of <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E034</strong>: The value of <code class=\"docutils literal notranslate\">readonly_fields</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E035</strong>: The value of <code class=\"docutils literal notranslate\">readonly_fields[n]</code> is not a callable, an\nattribute of <code class=\"docutils literal notranslate\">&lt;ModelAdmin class&gt;</code>, or an attribute of <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E036</strong>: The value of <code class=\"docutils literal notranslate\">autocomplete_fields</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E037</strong>: The value of <code class=\"docutils literal notranslate\">autocomplete_fields[n]</code> refers to\n<code class=\"docutils literal notranslate\">&lt;field name&gt;</code>, which is not an attribute of <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E038</strong>: The value of <code class=\"docutils literal notranslate\">autocomplete_fields[n]</code> must be a foreign\nkey or a many-to-many field.</p></li>\n<li><p><strong>admin.E039</strong>: An admin for model <code class=\"docutils literal notranslate\">&lt;model&gt;</code> has to be registered to be\nreferenced by <code class=\"docutils literal notranslate\">&lt;modeladmin&gt;.autocomplete_fields</code>.</p></li>\n<li><p><strong>admin.E040</strong>: <code class=\"docutils literal notranslate\">&lt;modeladmin&gt;</code> must define <code class=\"docutils literal notranslate\">search_fields</code>, because\nit’s referenced by <code class=\"docutils literal notranslate\">&lt;other_modeladmin&gt;.autocomplete_fields</code>.</p></li>\n</ul>\n<section id=\"modeladmin\">\n<h4><code class=\"docutils literal notranslate\">ModelAdmin</code><a class=\"heading-anchor\" href=\"#modeladmin\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>The following checks are performed on any\n<a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin\" title=\"django.contrib.admin.ModelAdmin\"><code class=\"xref py py-class docutils literal notranslate\">ModelAdmin</code></a> that is registered\nwith the admin site:</p>\n<ul class=\"simple\">\n<li><p><strong>admin.E101</strong>: The value of <code class=\"docutils literal notranslate\">save_as</code> must be a boolean.</p></li>\n<li><p><strong>admin.E102</strong>: The value of <code class=\"docutils literal notranslate\">save_on_top</code> must be a boolean.</p></li>\n<li><p><strong>admin.E103</strong>: The value of <code class=\"docutils literal notranslate\">inlines</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E104</strong>: <code class=\"docutils literal notranslate\">&lt;InlineModelAdmin class&gt;</code> must inherit from\n<code class=\"docutils literal notranslate\">InlineModelAdmin</code>.</p></li>\n<li><p><strong>admin.E105</strong>: <code class=\"docutils literal notranslate\">&lt;InlineModelAdmin class&gt;</code> must have a <code class=\"docutils literal notranslate\">model</code> attribute.</p></li>\n<li><p><strong>admin.E106</strong>: The value of <code class=\"docutils literal notranslate\">&lt;InlineModelAdmin class&gt;.model</code> must be a\n<code class=\"docutils literal notranslate\">Model</code>.</p></li>\n<li><p><strong>admin.E107</strong>: The value of <code class=\"docutils literal notranslate\">list_display</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E108</strong>: The value of <code class=\"docutils literal notranslate\">list_display[n]</code> refers to <code class=\"docutils literal notranslate\">&lt;label&gt;</code>,\nwhich is not a callable, an attribute of <code class=\"docutils literal notranslate\">&lt;ModelAdmin class&gt;</code>, or an\nattribute or method on <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E109</strong>: The value of <code class=\"docutils literal notranslate\">list_display[n]</code> must not be a\n<code class=\"docutils literal notranslate\">ManyToManyField</code> field.</p></li>\n<li><p><strong>admin.E110</strong>: The value of <code class=\"docutils literal notranslate\">list_display_links</code> must be a list, a tuple,\nor <code class=\"docutils literal notranslate\">None</code>.</p></li>\n<li><p><strong>admin.E111</strong>: The value of <code class=\"docutils literal notranslate\">list_display_links[n]</code> refers to <code class=\"docutils literal notranslate\">&lt;label&gt;</code>,\nwhich is not defined in <code class=\"docutils literal notranslate\">list_display</code>.</p></li>\n<li><p><strong>admin.E112</strong>: The value of <code class=\"docutils literal notranslate\">list_filter</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E113</strong>: The value of <code class=\"docutils literal notranslate\">list_filter[n]</code> must inherit from\n<code class=\"docutils literal notranslate\">ListFilter</code>.</p></li>\n<li><p><strong>admin.E114</strong>: The value of <code class=\"docutils literal notranslate\">list_filter[n]</code> must not inherit from\n<code class=\"docutils literal notranslate\">FieldListFilter</code>.</p></li>\n<li><p><strong>admin.E115</strong>: The value of <code class=\"docutils literal notranslate\">list_filter[n][1]</code> must inherit from\n<code class=\"docutils literal notranslate\">FieldListFilter</code>.</p></li>\n<li><p><strong>admin.E116</strong>: The value of <code class=\"docutils literal notranslate\">list_filter[n]</code> refers to <code class=\"docutils literal notranslate\">&lt;label&gt;</code>,\nwhich does not refer to a Field.</p></li>\n<li><p><strong>admin.E117</strong>: The value of <code class=\"docutils literal notranslate\">list_select_related</code> must be a boolean,\ntuple or list.</p></li>\n<li><p><strong>admin.E118</strong>: The value of <code class=\"docutils literal notranslate\">list_per_page</code> must be an integer.</p></li>\n<li><p><strong>admin.E119</strong>: The value of <code class=\"docutils literal notranslate\">list_max_show_all</code> must be an integer.</p></li>\n<li><p><strong>admin.E120</strong>: The value of <code class=\"docutils literal notranslate\">list_editable</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E121</strong>: The value of <code class=\"docutils literal notranslate\">list_editable[n]</code> refers to <code class=\"docutils literal notranslate\">&lt;label&gt;</code>,\nwhich is not an attribute of <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E122</strong>: The value of <code class=\"docutils literal notranslate\">list_editable[n]</code> refers to <code class=\"docutils literal notranslate\">&lt;label&gt;</code>,\nwhich is not contained in <code class=\"docutils literal notranslate\">list_display</code>.</p></li>\n<li><p><strong>admin.E123</strong>: The value of <code class=\"docutils literal notranslate\">list_editable[n]</code> cannot be in both\n<code class=\"docutils literal notranslate\">list_editable</code> and <code class=\"docutils literal notranslate\">list_display_links</code>.</p></li>\n<li><p><strong>admin.E124</strong>: The value of <code class=\"docutils literal notranslate\">list_editable[n]</code> refers to the first field\nin <code class=\"docutils literal notranslate\">list_display</code> (<code class=\"docutils literal notranslate\">&lt;label&gt;</code>), which cannot be used unless\n<code class=\"docutils literal notranslate\">list_display_links</code> is set.</p></li>\n<li><p><strong>admin.E125</strong>: The value of <code class=\"docutils literal notranslate\">list_editable[n]</code> refers to <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>,\nwhich is not editable through the admin.</p></li>\n<li><p><strong>admin.E126</strong>: The value of <code class=\"docutils literal notranslate\">search_fields</code> must be a list or tuple.</p></li>\n<li><p><strong>admin.E127</strong>: The value of <code class=\"docutils literal notranslate\">date_hierarchy</code> refers to <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>,\nwhich does not refer to a Field.</p></li>\n<li><p><strong>admin.E128</strong>: The value of <code class=\"docutils literal notranslate\">date_hierarchy</code> must be a <code class=\"docutils literal notranslate\">DateField</code> or\n<code class=\"docutils literal notranslate\">DateTimeField</code>.</p></li>\n<li><p><strong>admin.E129</strong>: <code class=\"docutils literal notranslate\">&lt;modeladmin&gt;</code> must define a <code class=\"docutils literal notranslate\">has_&lt;foo&gt;_permission()</code>\nmethod for the <code class=\"docutils literal notranslate\">&lt;action&gt;</code> action.</p></li>\n<li><p><strong>admin.E130</strong>: <code class=\"docutils literal notranslate\">__name__</code> attributes of actions defined in\n<code class=\"docutils literal notranslate\">&lt;modeladmin&gt;</code> must be unique.</p></li>\n</ul>\n</section>\n<section id=\"inlinemodeladmin\">\n<h4><code class=\"docutils literal notranslate\">InlineModelAdmin</code><a class=\"heading-anchor\" href=\"#inlinemodeladmin\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>The following checks are performed on any\n<a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin\" title=\"django.contrib.admin.InlineModelAdmin\"><code class=\"xref py py-class docutils literal notranslate\">InlineModelAdmin</code></a> that is registered as an\ninline on a <a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin\" title=\"django.contrib.admin.ModelAdmin\"><code class=\"xref py py-class docutils literal notranslate\">ModelAdmin</code></a>.</p>\n<ul class=\"simple\">\n<li><p><strong>admin.E201</strong>: Cannot exclude the field <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>, because it is the\nforeign key to the parent model <code class=\"docutils literal notranslate\">&lt;app_label&gt;.&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E202</strong>: <code class=\"docutils literal notranslate\">&lt;model&gt;</code> has no <code class=\"docutils literal notranslate\">ForeignKey</code> to <code class=\"docutils literal notranslate\">&lt;parent model&gt;</code>./\n<code class=\"docutils literal notranslate\">&lt;model&gt;</code> has more than one <code class=\"docutils literal notranslate\">ForeignKey</code> to <code class=\"docutils literal notranslate\">&lt;parent model&gt;</code>.</p></li>\n<li><p><strong>admin.E203</strong>: The value of <code class=\"docutils literal notranslate\">extra</code> must be an integer.</p></li>\n<li><p><strong>admin.E204</strong>: The value of <code class=\"docutils literal notranslate\">max_num</code> must be an integer.</p></li>\n<li><p><strong>admin.E205</strong>: The value of <code class=\"docutils literal notranslate\">min_num</code> must be an integer.</p></li>\n<li><p><strong>admin.E206</strong>: The value of <code class=\"docutils literal notranslate\">formset</code> must inherit from\n<code class=\"docutils literal notranslate\">BaseModelFormSet</code>.</p></li>\n</ul>\n</section>\n<section id=\"genericinlinemodeladmin\">\n<h4><code class=\"docutils literal notranslate\">GenericInlineModelAdmin</code><a class=\"heading-anchor\" href=\"#genericinlinemodeladmin\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>The following checks are performed on any\n<a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/contenttypes/#django.contrib.contenttypes.admin.GenericInlineModelAdmin\" title=\"django.contrib.contenttypes.admin.GenericInlineModelAdmin\"><code class=\"xref py py-class docutils literal notranslate\">GenericInlineModelAdmin</code></a> that is\nregistered as an inline on a <a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin\" title=\"django.contrib.admin.ModelAdmin\"><code class=\"xref py py-class docutils literal notranslate\">ModelAdmin</code></a>.</p>\n<ul class=\"simple\">\n<li><p><strong>admin.E301</strong>: <code class=\"docutils literal notranslate\">'ct_field'</code> references <code class=\"docutils literal notranslate\">&lt;label&gt;</code>, which is not a field\non <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E302</strong>: <code class=\"docutils literal notranslate\">'ct_fk_field'</code> references <code class=\"docutils literal notranslate\">&lt;label&gt;</code>, which is not a\nfield on <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>admin.E303</strong>: <code class=\"docutils literal notranslate\">&lt;model&gt;</code> has no <code class=\"docutils literal notranslate\">GenericForeignKey</code>.</p></li>\n<li><p><strong>admin.E304</strong>: <code class=\"docutils literal notranslate\">&lt;model&gt;</code> has no <code class=\"docutils literal notranslate\">GenericForeignKey</code> using content type\nfield <code class=\"docutils literal notranslate\">&lt;field name&gt;</code> and object ID field <code class=\"docutils literal notranslate\">&lt;field name&gt;</code>.</p></li>\n</ul>\n</section>\n<section id=\"adminsite\">\n<h4><code class=\"docutils literal notranslate\">AdminSite</code><a class=\"heading-anchor\" href=\"#adminsite\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h4>\n<p>The following checks are performed on the default\n<a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/admin/#django.contrib.admin.AdminSite\" title=\"django.contrib.admin.AdminSite\"><code class=\"xref py py-class docutils literal notranslate\">AdminSite</code></a>:</p>\n<ul class=\"simple\">\n<li><p><strong>admin.E401</strong>: <a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/contenttypes/#module-django.contrib.contenttypes\" title=\"django.contrib.contenttypes: Provides generic interface to installed models.\"><code class=\"xref py py-mod docutils literal notranslate\">django.contrib.contenttypes</code></a> must be in\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\">INSTALLED_APPS</code></a> in order to use the admin application.</p></li>\n<li><p><strong>admin.E402</strong>: <a class=\"reference internal\" href=\"/pl/3.0/ref/templates/api/#django.contrib.auth.context_processors.auth\" title=\"django.contrib.auth.context_processors.auth\"><code class=\"xref py py-mod docutils literal notranslate\">django.contrib.auth.context_processors.auth</code></a>\nmust be enabled in <a class=\"reference internal\" href=\"/pl/3.0/topics/templates/#django.template.backends.django.DjangoTemplates\" title=\"django.template.backends.django.DjangoTemplates\"><code class=\"xref py py-class docutils literal notranslate\">DjangoTemplates</code></a>\n(<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-TEMPLATES\"><code class=\"xref std std-setting docutils literal notranslate\">TEMPLATES</code></a>) if using the default auth backend in order to use the\nadmin application.</p></li>\n<li><p><strong>admin.E403</strong>: A <a class=\"reference internal\" href=\"/pl/3.0/topics/templates/#django.template.backends.django.DjangoTemplates\" title=\"django.template.backends.django.DjangoTemplates\"><code class=\"xref py py-class docutils literal notranslate\">django.template.backends.django.DjangoTemplates</code></a>\ninstance must be configured in <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-TEMPLATES\"><code class=\"xref std std-setting docutils literal notranslate\">TEMPLATES</code></a> in order to use the\nadmin application.</p></li>\n<li><p><strong>admin.E404</strong>: <code class=\"docutils literal notranslate\">django.contrib.messages.context_processors.messages</code>\nmust be enabled in <a class=\"reference internal\" href=\"/pl/3.0/topics/templates/#django.template.backends.django.DjangoTemplates\" title=\"django.template.backends.django.DjangoTemplates\"><code class=\"xref py py-class docutils literal notranslate\">DjangoTemplates</code></a>\n(<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-TEMPLATES\"><code class=\"xref std std-setting docutils literal notranslate\">TEMPLATES</code></a>) in order to use the admin application.</p></li>\n<li><p><strong>admin.E405</strong>: <a class=\"reference internal\" href=\"/pl/3.0/topics/auth/#module-django.contrib.auth\" title=\"django.contrib.auth: Django's authentication framework.\"><code class=\"xref py py-mod docutils literal notranslate\">django.contrib.auth</code></a> must be in\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\">INSTALLED_APPS</code></a> in order to use the admin application.</p></li>\n<li><p><strong>admin.E406</strong>: <a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/messages/#module-django.contrib.messages\" title=\"django.contrib.messages: Provides cookie- and session-based temporary message storage.\"><code class=\"xref py py-mod docutils literal notranslate\">django.contrib.messages</code></a> must be in\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-INSTALLED_APPS\"><code class=\"xref std std-setting docutils literal notranslate\">INSTALLED_APPS</code></a> in order to use the admin application.</p></li>\n<li><p><strong>admin.E408</strong>:\n<a class=\"reference internal\" href=\"/pl/3.0/ref/middleware/#django.contrib.auth.middleware.AuthenticationMiddleware\" title=\"django.contrib.auth.middleware.AuthenticationMiddleware\"><code class=\"xref py py-class docutils literal notranslate\">django.contrib.auth.middleware.AuthenticationMiddleware</code></a> must be in\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\">MIDDLEWARE</code></a> in order to use the admin application.</p></li>\n<li><p><strong>admin.E409</strong>: <a class=\"reference internal\" href=\"/pl/3.0/ref/middleware/#django.contrib.messages.middleware.MessageMiddleware\" title=\"django.contrib.messages.middleware.MessageMiddleware\"><code class=\"xref py py-class docutils literal notranslate\">django.contrib.messages.middleware.MessageMiddleware</code></a>\nmust be in <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\">MIDDLEWARE</code></a> in order to use the admin application.</p></li>\n<li><p><strong>admin.E410</strong>: <a class=\"reference internal\" href=\"/pl/3.0/ref/middleware/#django.contrib.sessions.middleware.SessionMiddleware\" title=\"django.contrib.sessions.middleware.SessionMiddleware\"><code class=\"xref py py-class docutils literal notranslate\">django.contrib.sessions.middleware.SessionMiddleware</code></a>\nmust be in <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-MIDDLEWARE\"><code class=\"xref std std-setting docutils literal notranslate\">MIDDLEWARE</code></a> in order to use the admin application.</p></li>\n</ul>\n</section>\n</section>\n<section id=\"auth\">\n<h3><code class=\"docutils literal notranslate\">auth</code><a class=\"heading-anchor\" href=\"#auth\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<ul class=\"simple\">\n<li><p><strong>auth.E001</strong>: <code class=\"docutils literal notranslate\">REQUIRED_FIELDS</code> must be a list or tuple.</p></li>\n<li><p><strong>auth.E002</strong>: The field named as the <code class=\"docutils literal notranslate\">USERNAME_FIELD</code> for a custom user\nmodel must not be included in <code class=\"docutils literal notranslate\">REQUIRED_FIELDS</code>.</p></li>\n<li><p><strong>auth.E003</strong>: <code class=\"docutils literal notranslate\">&lt;field&gt;</code> must be unique because it is named as the\n<code class=\"docutils literal notranslate\">USERNAME_FIELD</code>.</p></li>\n<li><p><strong>auth.W004</strong>: <code class=\"docutils literal notranslate\">&lt;field&gt;</code> is named as the <code class=\"docutils literal notranslate\">USERNAME_FIELD</code>, but it is not\nunique.</p></li>\n<li><p><strong>auth.E005</strong>: The permission codenamed <code class=\"docutils literal notranslate\">&lt;codename&gt;</code> clashes with a builtin\npermission for model <code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>auth.E006</strong>: The permission codenamed <code class=\"docutils literal notranslate\">&lt;codename&gt;</code> is duplicated for model\n<code class=\"docutils literal notranslate\">&lt;model&gt;</code>.</p></li>\n<li><p><strong>auth.E007</strong>: The <a class=\"reference internal\" href=\"/pl/3.0/ref/models/options/#django.db.models.Options.verbose_name\" title=\"django.db.models.Options.verbose_name\"><code class=\"xref py py-attr docutils literal notranslate\">verbose_name</code></a> of model <code class=\"docutils literal notranslate\">&lt;model&gt;</code> must be at most\n244 characters for its builtin permission names\nto be at most 255 characters.</p></li>\n<li><p><strong>auth.E008</strong>: The permission named <code class=\"docutils literal notranslate\">&lt;name&gt;</code> of model <code class=\"docutils literal notranslate\">&lt;model&gt;</code> is longer\nthan 255 characters.</p></li>\n<li><p><strong>auth.C009</strong>: <code class=\"docutils literal notranslate\">&lt;User model&gt;.is_anonymous</code> must be an attribute or property\nrather than a method. Ignoring this is a security issue as anonymous users\nwill be treated as authenticated!</p></li>\n<li><p><strong>auth.C010</strong>: <code class=\"docutils literal notranslate\">&lt;User model&gt;.is_authenticated</code> must be an attribute or\nproperty rather than a method. Ignoring this is a security issue as anonymous\nusers will be treated as authenticated!</p></li>\n</ul>\n</section>\n<section id=\"contenttypes\">\n<h3><code class=\"docutils literal notranslate\">contenttypes</code><a class=\"heading-anchor\" href=\"#contenttypes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The following checks are performed when a model contains a\n<a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/contenttypes/#django.contrib.contenttypes.fields.GenericForeignKey\" title=\"django.contrib.contenttypes.fields.GenericForeignKey\"><code class=\"xref py py-class docutils literal notranslate\">GenericForeignKey</code></a> or\n<a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/contenttypes/#django.contrib.contenttypes.fields.GenericRelation\" title=\"django.contrib.contenttypes.fields.GenericRelation\"><code class=\"xref py py-class docutils literal notranslate\">GenericRelation</code></a>:</p>\n<ul class=\"simple\">\n<li><p><strong>contenttypes.E001</strong>: The <code class=\"docutils literal notranslate\">GenericForeignKey</code> object ID references the\nnonexistent field <code class=\"docutils literal notranslate\">&lt;field&gt;</code>.</p></li>\n<li><p><strong>contenttypes.E002</strong>: The <code class=\"docutils literal notranslate\">GenericForeignKey</code> content type references the\nnonexistent field <code class=\"docutils literal notranslate\">&lt;field&gt;</code>.</p></li>\n<li><p><strong>contenttypes.E003</strong>: <code class=\"docutils literal notranslate\">&lt;field&gt;</code> is not a <code class=\"docutils literal notranslate\">ForeignKey</code>.</p></li>\n<li><p><strong>contenttypes.E004</strong>: <code class=\"docutils literal notranslate\">&lt;field&gt;</code> is not a <code class=\"docutils literal notranslate\">ForeignKey</code> to\n<code class=\"docutils literal notranslate\">contenttypes.ContentType</code>.</p></li>\n<li><p><strong>contenttypes.E005</strong>: Model names must be at most 100 characters.</p></li>\n</ul>\n</section>\n<section id=\"postgres\">\n<h3><code class=\"docutils literal notranslate\">postgres</code><a class=\"heading-anchor\" href=\"#postgres\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The following checks are performed on <a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/postgres/#module-django.contrib.postgres\" title=\"django.contrib.postgres: PostgreSQL-specific fields and features\"><code class=\"xref py py-mod docutils literal notranslate\">django.contrib.postgres</code></a> model\nfields:</p>\n<ul class=\"simple\">\n<li><p><strong>postgres.E001</strong>: Base field for array has errors: …</p></li>\n<li><p><strong>postgres.E002</strong>: Base field for array cannot be a related field.</p></li>\n<li><p><strong>postgres.E003</strong>: <code class=\"docutils literal notranslate\">&lt;field&gt;</code> default should be a callable instead of an\ninstance so that it’s not shared between all field instances.</p></li>\n</ul>\n</section>\n<section id=\"sites\">\n<h3><code class=\"docutils literal notranslate\">sites</code><a class=\"heading-anchor\" href=\"#sites\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The following checks are performed on any model using a\n<a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/sites/#django.contrib.sites.managers.CurrentSiteManager\" title=\"django.contrib.sites.managers.CurrentSiteManager\"><code class=\"xref py py-class docutils literal notranslate\">CurrentSiteManager</code></a>:</p>\n<ul class=\"simple\">\n<li><p><strong>sites.E001</strong>: <code class=\"docutils literal notranslate\">CurrentSiteManager</code> could not find a field named\n<code class=\"docutils literal notranslate\">&lt;field name&gt;</code>.</p></li>\n<li><p><strong>sites.E002</strong>: <code class=\"docutils literal notranslate\">CurrentSiteManager</code> cannot use <code class=\"docutils literal notranslate\">&lt;field&gt;</code> as it is not a\nforeign key or a many-to-many field.</p></li>\n</ul>\n</section>\n<section id=\"staticfiles\">\n<h3><code class=\"docutils literal notranslate\">staticfiles</code><a class=\"heading-anchor\" href=\"#staticfiles\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>The following checks verify that <a class=\"reference internal\" href=\"/pl/3.0/ref/contrib/staticfiles/#module-django.contrib.staticfiles\" title=\"django.contrib.staticfiles: An app for handling static files.\"><code class=\"xref py py-mod docutils literal notranslate\">django.contrib.staticfiles</code></a> is correctly\nconfigured:</p>\n<ul class=\"simple\">\n<li><p><strong>staticfiles.E001</strong>: The <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-STATICFILES_DIRS\"><code class=\"xref std std-setting docutils literal notranslate\">STATICFILES_DIRS</code></a> setting is not a tuple\nor list.</p></li>\n<li><p><strong>staticfiles.E002</strong>: The <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-STATICFILES_DIRS\"><code class=\"xref std std-setting docutils literal notranslate\">STATICFILES_DIRS</code></a> setting should not\ncontain the <a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-STATIC_ROOT\"><code class=\"xref std std-setting docutils literal notranslate\">STATIC_ROOT</code></a> setting.</p></li>\n<li><p><strong>staticfiles.E003</strong>: The prefix <code class=\"docutils literal notranslate\">&lt;prefix&gt;</code> in the\n<a class=\"reference internal\" href=\"/pl/3.0/ref/settings/#std-setting-STATICFILES_DIRS\"><code class=\"xref std std-setting docutils literal notranslate\">STATICFILES_DIRS</code></a> setting must not end with a slash.</p></li>\n</ul>\n</section>\n</section>","rootId":"system-check-framework","toc":[{"title":"API reference","anchor":"api-reference","children":[{"title":"CheckMessage","anchor":"checkmessage","children":[]}]},{"title":"Builtin tags","anchor":"builtin-tags","children":[]},{"title":"Core system checks","anchor":"core-system-checks","children":[{"title":"Backwards compatibility","anchor":"backwards-compatibility","children":[]},{"title":"Caches","anchor":"caches","children":[]},{"title":"Database","anchor":"database","children":[{"title":"MySQL","anchor":"mysql","children":[]}]},{"title":"Model fields","anchor":"model-fields","children":[{"title":"File fields","anchor":"file-fields","children":[]},{"title":"Related fields","anchor":"related-fields","children":[]}]},{"title":"Models","anchor":"models","children":[]},{"title":"Security","anchor":"security","children":[]},{"title":"Signals","anchor":"signals","children":[]},{"title":"Templates","anchor":"templates","children":[]},{"title":"Translation","anchor":"translation","children":[]},{"title":"URLs","anchor":"urls","children":[]}]},{"title":"contrib app checks","anchor":"contrib-app-checks","children":[{"title":"admin","anchor":"admin","children":[{"title":"ModelAdmin","anchor":"modeladmin","children":[]},{"title":"InlineModelAdmin","anchor":"inlinemodeladmin","children":[]},{"title":"GenericInlineModelAdmin","anchor":"genericinlinemodeladmin","children":[]},{"title":"AdminSite","anchor":"adminsite","children":[]}]},{"title":"auth","anchor":"auth","children":[]},{"title":"contenttypes","anchor":"contenttypes","children":[]},{"title":"postgres","anchor":"postgres","children":[]},{"title":"sites","anchor":"sites","children":[]},{"title":"staticfiles","anchor":"staticfiles","children":[]}]}],"breadcrumbs":[{"docname":"ref/index","title":"API Reference","url":"/pl/3.0/ref/"}],"prev":{"docname":"ref/applications","title":"Applications","url":"/pl/3.0/ref/applications/"},"next":{"docname":"ref/class-based-views/index","title":"Built-in class-based views API","url":"/pl/3.0/ref/class-based-views/"},"formats":{"html":"/pl/3.0/ref/checks/","markdown":"/pl/3.0/ref/checks.md","json":"/pl/3.0/ref/checks.json"},"source":"https://github.com/django/django/blob/stable/3.0.x/docs/ref/checks.txt","official":"https://docs.djangoproject.com/pl/3.0/ref/checks/","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","1.11","1.10"],"inLocales":["en","zh-hans","fr","ja","id","pt-br","ko","es","el","pl"]}