系统检查框架Link to this heading
系统检查框架是一组验证Django项目的静态检查。 它检测到常见的问题,并提供了如何解决这些问题的提示。 该框架是可扩展的,所以你可以轻松地添加自己的检查。
有关如何添加自己的检查并将其与 Django 的系统检查集成的详细信息,请参阅:doc:系统检查主题指南</topics/checks>。
API 参考Link to this heading
“CheckMessage”Link to this heading
- class CheckMessage(level, msg, hint=None, obj=None, id=None)Link to this definition
系统检查提出的警告和错误必须是“CheckMessage”的实例。 一个实例封装了一个可报告的错误或警告。 它还提供适用于消息的上下文和提示以及用于过滤目的的唯一标识符。
构造方法的参数:
level消息的严重性。 使用其中一个预定义的值:DEBUG,INFO,WARNING,ERROR,CRITICAL。 如果级别大于或等于“ERROR”,则Django将阻止执行管理命令。 级别低于“ERROR”的消息(即警告)被报告给控制台,但是可以被静默。
msg用来描述问题的一个简短字符串(少于80个字符)。这个字符串不应该包含换行符。
hint提供解决问题的提示的单行字符串。 如果不能提供提示,或者错误消息中的提示是显而易见的,则提示可以省略,或者可以使用“None”的值。
objOptional. An object providing context for the message (for example, the model where the problem was discovered). The object should be a model, field, or manager or any other object that defines a
__str__()method. The method is used while reporting all messages and its result precedes the message.idOptional string. A unique identifier for the issue. Identifiers should follow the pattern
applabel.X001, whereXis one of the lettersCEWID, indicating the message severity (Cfor criticals,Efor errors and so). The number can be allocated by the application, but should be unique within that application.
有一些子类可以使创建通用级别的消息更简单。 当使用它们时,可以省略“level”参数,因为它是由类名所隐含的。
- class Debug(msg, hint=None, obj=None, id=None)Link to this definition
- class Info(msg, hint=None, obj=None, id=None)Link to this definition
- class Warning(msg, hint=None obj=None, id=None)Link to this definition
- class Error(msg, hint=None, obj=None, id=None)Link to this definition
- class Critical(msg, hint=None, obj=None, id=None)Link to this definition
核心系统检查Link to this heading
向后兼容Link to this heading
兼容性检查警告那些升级 Django 后可能出现的问题。
2_0.W001: Your URL pattern
<pattern>has aroutethat contains(?P<, begins with a^, or ends with a$. This was likely an oversight when migrating fromurl()topath().
缓存Link to this heading
The following checks verify that your CACHES setting is correctly
configured:
caches.E001: You must define a
'default'cache in yourCACHESsetting.
数据库Link to this heading
MySQLLink to this heading
如果您使用MySQL,需要执行以下检查:
mysql.E001: MySQL does not allow unique
CharFields to have amax_length> 255.mysql.W002: MySQL Strict Mode is not set for database connection
<alias>. See also Setting sql_mode.
模型字段Link to this heading
fields.E001: 字段名不能已下划线结尾。
fields.E002: 字段名不能有
"__".fields.E003*:
pk是保留关键字,不能作为字段名使用。** fields.E004 **:“choices”必须是可迭代的(例如,列表或元组)。
** fields.E006 **:
db_index``必须是`None`,``True``或`False。** fields.E007 **:主键不能有“null = True”。
fields.E008:所有
validators必须都是可调用的。fields.E009:
max_lengthis too small to fit the longest value inchoices(<count>characters).fields.E100:
AutoField`必须设置 primary_key=True。fields.E110:
BooleanFields do not accept null values. This check appeared before support for null values was added in Django 2.1.fields.E120:
CharField必须定义一个max_length属性。fields.E121:
max_length必须是个正整数。fields.W122:
max_length在使用<integer field type>时会被忽略。fields.E130:
DecimalField必须定义一个decimal_places属性。fields.E131:
decimal_places必须是个非负整数。fields.E132:
DecimalField必须定义一个max_digits属性。fields.E133:
max_digits必须是一个非负整数。fields.E134:
max_digits必须大于或等于decimal_places。fields.E140:
FilePathField的allow_files或allow_folders必须有一个被设为 True。fields.E150: 若``GenericIPAddressField`` 不允许 null 值,那么它也不接受空值,因为空值被保存为 null。
fields.E160: The options
auto_now,auto_now_add, anddefaultare mutually exclusive. Only one of these options may be present.fields.W161:默认绑定值。
fields.W162:
<database>并不支持在<field data type>列上创建数据库索引。fields.E170:
BinaryField’sdefaultcannot be a string. Use bytes content instead.fields.E900:
IPAddressFieldhas been removed except for support in historical migrations.fields.W900:
IPAddressFieldhas been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9. This check appeared in Django 1.7 and 1.8.fields.W901:
CommaSeparatedIntegerFieldhas been deprecated. Support for it (except in historical migrations) will be removed in Django 2.0. This check appeared in Django 1.10 and 1.11.fields.E901:
CommaSeparatedIntegerFieldis removed except for support in historical migrations.fields.W902:
FloatRangeFieldis deprecated and will be removed in Django 3.1.
文件字段Link to this heading
fields.E200:
uniqueis not a valid argument for aFileField. This check is removed in Django 1.11.fields.E201:
primary_key对于FileField来说不是个有效的参数。fields.E202:
FileField的upload_to参数必须是个相对路径,而不是一个相对路径。fields.E210: 不能使用
ImageField,因为未安装 Pillow。
模型Link to this heading
models.E001:
<swappable>不是表单app_label.app_name。models.E002:
<SETTING>references<model>, which has not been installed, or is abstract.models.E003: The model has two identical many-to-many relations through the intermediate model
<app_label>.<model>.models.E004:
idcan only be used as a field name if the field also setsprimary_key=True.models.E005: The field
<field name>from parent model<model>clashes with the field<field name>from parent model<model>.models.E006:与另一个模型
<model>的字段<field name>冲突的字段。models.E007: 列名
<column name>被其它字段使用的字段<field name>。models.E008:
index_together必须是个列表或元组。models.E009: 所有
index_together元素都必须是列表或元组。models.E010:
unique_together必须是个列表或元组。models.E011: 所有
unique_together元素都必须是列表或元组。models.E012:
indexes/index_together/unique_together指向了不存在的字段<field name>。models.E013:
indexes/index_together/unique_together指向一个ManyToManyField<field name>,但此选项不支持ManyToManyField。models.E014:
ordering必须是个元组或列表(即便你只想按照一个字段进行排序)。models.E015:
orderingrefers to the nonexistent field, related field, or lookup<field name>.models.E016:
indexes/index_together/unique_togetherrefers to field<field_name>which is not local to model<model>.models.E017: Proxy model
<model>contains model fields.models.E018: Autogenerated column name too long for field
<field>. Maximum length is<maximum length>for database<alias>.models.E019: Autogenerated column name too long for M2M field
<M2M field>. Maximum length is<maximum length>for database<alias>.models.E020: The
<model>.check()class method is currently overridden.models.E021:
orderingandorder_with_respect_tocannot be used together.models.E022:
<function>contains a lazy reference to<app label>.<model>, but app<app label>isn't installed or doesn't provide model<model>.models.E023: The model name
<model>cannot start or end with an underscore as it collides with the query lookup syntax.models.E024: The model name
<model>cannot contain double underscores as it collides with the query lookup syntax.models.E025: The property
<property name>clashes with a related field accessor.models.E026: The model cannot have more than one field with
primary_key=True.models.W027:
<database>does not support check constraints.models.E028:
db_table<db_table>is used by multiple models:<model list>.models.E029: index name
<index>is not unique for model<model>.models.E030: index name
<index>is not unique amongst models:<model list>.models.E031: constraint name
<constraint>is not unique for model<model>.models.E032: constraint name
<constraint>is not unique amongst models:<model list>.models.E033: The index name
<index>cannot start with an underscore or a number.models.E034: The index name
<index>cannot be longer than<max_length>characters.models.W035:
db_table<db_table>is used by multiple models:<model list>.
安全Link to this heading
The security checks do not make your site secure. They do not audit code, do intrusion detection, or do anything particularly complex. Rather, they help perform an automated, low-hanging-fruit checklist, that can help you to improve your site's security.
Some of these checks may not be appropriate for your particular deployment
configuration. For instance, if you do your HTTP to HTTPS redirection in a load
balancer, it'd be irritating to be constantly warned about not having enabled
SECURE_SSL_REDIRECT. Use SILENCED_SYSTEM_CHECKS to
silence unneeded checks.
The following checks are run if you use the check --deploy option:
security.W001: You do not have
django.middleware.security.SecurityMiddlewarein yourMIDDLEWAREso theSECURE_HSTS_SECONDS,SECURE_CONTENT_TYPE_NOSNIFF,SECURE_BROWSER_XSS_FILTER,SECURE_REFERRER_POLICY, andSECURE_SSL_REDIRECTsettings will have no effect.security.W002: You do not have
django.middleware.clickjacking.XFrameOptionsMiddlewarein yourMIDDLEWARE, so your pages will not be served with an'x-frame-options'header. Unless there is a good reason for your site to be served in a frame, you should consider enabling this header to help prevent clickjacking attacks.security.W003: You don't appear to be using Django's built-in cross-site request forgery protection via the middleware (
django.middleware.csrf.CsrfViewMiddlewareis not in yourMIDDLEWARE). Enabling the middleware is the safest approach to ensure you don't leave any holes.security.W004: You have not set a value for the
SECURE_HSTS_SECONDSsetting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.security.W005: You have not set the
SECURE_HSTS_INCLUDE_SUBDOMAINSsetting toTrue. Without this, your site is potentially vulnerable to attack via an insecure connection to a subdomain. Only set this toTrueif you are certain that all subdomains of your domain should be served exclusively via SSL.security.W006: Your
SECURE_CONTENT_TYPE_NOSNIFFsetting is not set toTrue, so your pages will not be served with an'X-Content-Type-Options: nosniff'header. You should consider enabling this header to prevent the browser from identifying content types incorrectly.security.W007: Your
SECURE_BROWSER_XSS_FILTERsetting is not set toTrue, so your pages will not be served with an'X-XSS-Protection: 1; mode=block'header. You should consider enabling this header to activate the browser's XSS filtering and help prevent XSS attacks. This check is removed in Django 3.0 as theX-XSS-Protectionheader is no longer honored by modern browsers.security.W008: Your
SECURE_SSL_REDIRECTsetting is not set toTrue. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting toTrueor configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.security.W009: Your
SECRET_KEYhas less than 50 characters or less than 5 unique characters. Please generate a long and randomSECRET_KEY, otherwise many of Django's security-critical features will be vulnerable to attack.security.W010: You have
django.contrib.sessionsin yourINSTALLED_APPSbut you have not setSESSION_COOKIE_SECUREtoTrue. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.security.W011: You have
django.contrib.sessions.middleware.SessionMiddlewarein yourMIDDLEWARE, but you have not setSESSION_COOKIE_SECUREtoTrue. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.security.W012:
SESSION_COOKIE_SECUREis not set toTrue. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.security.W013: You have
django.contrib.sessionsin yourINSTALLED_APPS, but you have not setSESSION_COOKIE_HTTPONLYtoTrue. Using anHttpOnlysession cookie makes it more difficult for cross-site scripting attacks to hijack user sessions.security.W014: You have
django.contrib.sessions.middleware.SessionMiddlewarein yourMIDDLEWARE, but you have not setSESSION_COOKIE_HTTPONLYtoTrue. Using anHttpOnlysession cookie makes it more difficult for cross-site scripting attacks to hijack user sessions.security.W015:
SESSION_COOKIE_HTTPONLYis not set toTrue. Using anHttpOnlysession cookie makes it more difficult for cross-site scripting attacks to hijack user sessions.security.W016:
CSRF_COOKIE_SECUREis not set toTrue. Using a secure-only CSRF cookie makes it more difficult for network traffic sniffers to steal the CSRF token.security.W017:
CSRF_COOKIE_HTTPONLYis not set toTrue. Using anHttpOnlyCSRF cookie makes it more difficult for cross-site scripting attacks to steal the CSRF token. This check is removed in Django 1.11 as theCSRF_COOKIE_HTTPONLYsetting offers no practical benefit.security.W018: You should not have
DEBUGset toTruein deployment.security.W019: You have
django.middleware.clickjacking.XFrameOptionsMiddlewarein yourMIDDLEWARE, butX_FRAME_OPTIONSis not set to'DENY'. Unless there is a good reason for your site to serve other parts of itself in a frame, you should change it to'DENY'.security.W020:
ALLOWED_HOSTSmust not be empty in deployment.security.W021: You have not set the
SECURE_HSTS_PRELOADsetting toTrue. Without this, your site cannot be submitted to the browser preload list.security.W022: You have not set the
SECURE_REFERRER_POLICYsetting. Without this, your site will not send a Referrer-Policy header. You should consider enabling this header to protect user privacy.security.E023: You have set the
SECURE_REFERRER_POLICYsetting to an invalid value.
信号Link to this heading
signals.E001:
<handler>was connected to the<signal>signal with a lazy reference to the sender<app label>.<model>, but app<app label>isn't installed or doesn't provide model<model>.
模板Link to this heading
The following checks verify that your TEMPLATES setting is correctly
configured:
翻译Link to this heading
The following checks are performed on your translation configuration:
translation.E001: You have provided an invalid value for the
LANGUAGE_CODEsetting:<value>.translation.E002: You have provided an invalid language code in the
LANGUAGESsetting:<value>.translation.E003: You have provided an invalid language code in the
LANGUAGES_BIDIsetting:<value>.translation.E004: You have provided a value for the
LANGUAGE_CODEsetting that is not in theLANGUAGESsetting.
URLsLink to this heading
以下检查项针对你的 URL 配置执行:
urls.W001: Your URL pattern
<pattern>usesinclude()with arouteending with a$. Remove the dollar from therouteto avoid problems including URLs.urls.W002: Your URL pattern
<pattern>has aroutebeginning with a/. Remove this slash as it is unnecessary. If this pattern is targeted in aninclude(), ensure theinclude()pattern has a trailing/.urls.W003: Your URL pattern
<pattern>has anameincluding a:. Remove the colon, to avoid ambiguous namespace references.urls.E004: Your URL pattern
<pattern>is invalid. Ensure thaturlpatternsis a list ofpath()and/orre_path()instances.urls.W005: URL namespace
<namespace>isn't unique. You may not be able to reverse all URLs in this namespace.urls.E006: The
MEDIA_URL/STATIC_URLsetting must end with a slash.urls.E007: The custom
handlerXXXview'path.to.view'does not take the correct number of arguments (…).urls.E008: The custom
handlerXXXview'path.to.view'could not be imported.
contrib 应用检查Link to this heading
adminLink to this heading
后台检查项均作为 admin 标签的一部分执行。
以下检查项在每个通过后台站点注册的 ModelAdmin (或其子类)上执行。
admin.E001:
raw_id_fields的值必须是个列表或元组。admin.E002:
raw_id_fields[n]的值指向<field name>,它并不是<model>的属性。admin.E003:
raw_id_fields[n]的值必须是个外键或一个多对多字段。admin.E004:
fields的值必须是列表或元组。admin.E005:
fieldsets和fields都是定制的。admin.E006:
fields的值包含了重复字段。admin.E007:
fieldsets的值必须是个列表或元组。admin.E008:
fieldsets[n]的值必须是个列表或元组。admin.E009:
fieldsets[n]的值的长度必须是 2。admin.E010:
fieldsets[n][1]的值必须是个字典。admin.E011:
fieldsets[n][1]的值必须包含键fields。admin.E012:
fieldsets[n][1]中有重复字段。admin.E013:
fields[n]/fieldsets[n][m]cannot include theManyToManyField<field name>, because that field manually specifies a relationship model.admin.E014:
exclude的值必须是个列表或元组。admin.E015:
exclude的值必须包含重复字段。admin.E016:
form的值必须继承自BaseModelForm。admin.E017:
filter_vertical的值必须是个列表或元组。admin.E018:
filter_horizontal的值必须是个列表或元组。admin.E019: The value of
filter_vertical[n]/filter_vertical[n]refers to<field name>, which is not an attribute of<model>.admin.E020: The value of
filter_vertical[n]/filter_vertical[n]must be a many-to-many field.admin.E021: The value of
radio_fieldsmust be a dictionary.admin.E022: The value of
radio_fieldsrefers to<field name>, which is not an attribute of<model>.admin.E023: The value of
radio_fieldsrefers to<field name>, which is not aForeignKey, and does not have achoicesdefinition.admin.E024: The value of
radio_fields[<field name>]must be eitheradmin.HORIZONTALoradmin.VERTICAL.admin.E025: The value of
view_on_sitemust be either a callable or a boolean value.admin.E026: The value of
prepopulated_fieldsmust be a dictionary.admin.E027: The value of
prepopulated_fieldsrefers to<field name>, which is not an attribute of<model>.admin.E028: The value of
prepopulated_fieldsrefers to<field name>, which must not be aDateTimeField, aForeignKey, aOneToOneField, or aManyToManyFieldfield.admin.E029: The value of
prepopulated_fields[<field name>]must be a list or tuple.admin.E030: The value of
prepopulated_fieldsrefers to<field name>, which is not an attribute of<model>.admin.E031: The value of
orderingmust be a list or tuple.admin.E032: The value of
orderinghas the random ordering marker?, but contains other fields as well.admin.E033: The value of
orderingrefers to<field name>, which is not an attribute of<model>.admin.E034: The value of
readonly_fieldsmust be a list or tuple.admin.E035: The value of
readonly_fields[n]is not a callable, an attribute of<ModelAdmin class>, or an attribute of<model>.admin.E036: The value of
autocomplete_fieldsmust be a list or tuple.admin.E037: The value of
autocomplete_fields[n]refers to<field name>, which is not an attribute of<model>.admin.E038: The value of
autocomplete_fields[n]must be a foreign key or a many-to-many field.admin.E039: An admin for model
<model>has to be registered to be referenced by<modeladmin>.autocomplete_fields.admin.E040:
<modeladmin>must definesearch_fields, because it's referenced by<other_modeladmin>.autocomplete_fields.
ModelAdminLink to this heading
The following checks are performed on any
ModelAdmin that is registered
with the admin site:
admin.E101:
save_as的值必须是个布尔值。admin.E102:
save_on_top的值必须是个布尔值。admin.E103:
inlines的值必须是个列表或元组。admin.E104:
<InlineModelAdmin class>必须继承自InlineModelAdmin。admin.E105:
<InlineModelAdmin class>必须有个model属性。admin.E106:
<InlineModelAdmin class>.model的值必须是个Model。admin.E107:
list_display的值必须是个列表或元组。admin.E108: The value of
list_display[n]refers to<label>, which is not a callable, an attribute of<ModelAdmin class>, or an attribute or method on<model>.admin.E109:
list_display[n]的值绝对不能是个ManyToManyField字段。admin.E110: The value of
list_display_linksmust be a list, a tuple, orNone.admin.E111: The value of
list_display_links[n]refers to<label>, which is not defined inlist_display.admin.E112: The value of
list_filtermust be a list or tuple.admin.E113: The value of
list_filter[n]must inherit fromListFilter.admin.E114: The value of
list_filter[n]must not inherit fromFieldListFilter.admin.E115: The value of
list_filter[n][1]must inherit fromFieldListFilter.admin.E116: The value of
list_filter[n]refers to<label>, which does not refer to a Field.admin.E117: The value of
list_select_relatedmust be a boolean, tuple or list.admin.E118: The value of
list_per_pagemust be an integer.admin.E119: The value of
list_max_show_allmust be an integer.admin.E120: The value of
list_editablemust be a list or tuple.admin.E121: The value of
list_editable[n]refers to<label>, which is not an attribute of<model>.admin.E122: The value of
list_editable[n]refers to<label>, which is not contained inlist_display.admin.E123: The value of
list_editable[n]cannot be in bothlist_editableandlist_display_links.admin.E124: The value of
list_editable[n]refers to the first field inlist_display(<label>), which cannot be used unlesslist_display_linksis set.admin.E125: The value of
list_editable[n]refers to<field name>, which is not editable through the admin.admin.E126: The value of
search_fieldsmust be a list or tuple.admin.E127: The value of
date_hierarchyrefers to<field name>, which does not refer to a Field.admin.E128: The value of
date_hierarchymust be aDateFieldorDateTimeField.admin.E129:
<modeladmin>must define ahas_<foo>_permission()method for the<action>action.admin.E130:
__name__attributes of actions defined in<modeladmin>must be unique.
InlineModelAdminLink to this heading
The following checks are performed on any
InlineModelAdmin that is registered as an
inline on a ModelAdmin.
admin.E201: Cannot exclude the field
<field name>, because it is the foreign key to the parent model<app_label>.<model>.admin.E202:
<model>has noForeignKeyto<parent model>./<model>has more than oneForeignKeyto<parent model>.admin.E203: The value of
extramust be an integer.admin.E204: The value of
max_nummust be an integer.admin.E205: The value of
min_nummust be an integer.admin.E206: The value of
formsetmust inherit fromBaseModelFormSet.
GenericInlineModelAdminLink to this heading
The following checks are performed on any
GenericInlineModelAdmin that is
registered as an inline on a ModelAdmin.
admin.E301:
'ct_field'references<label>, which is not a field on<model>.admin.E302:
'ct_fk_field'references<label>, which is not a field on<model>.admin.E303:
<model>has noGenericForeignKey.admin.E304:
<model>has noGenericForeignKeyusing content type field<field name>and object ID field<field name>.
AdminSiteLink to this heading
The following checks are performed on the default
AdminSite:
admin.E401:
django.contrib.contenttypesmust be inINSTALLED_APPSin order to use the admin application.admin.E402:
django.contrib.auth.context_processors.authmust be enabled inDjangoTemplates(TEMPLATES) if using the default auth backend in order to use the admin application.admin.E403: A
django.template.backends.django.DjangoTemplatesinstance must be configured inTEMPLATESin order to use the admin application.admin.E404:
django.contrib.messages.context_processors.messagesmust be enabled inDjangoTemplates(TEMPLATES) in order to use the admin application.admin.E405:
django.contrib.authmust be inINSTALLED_APPSin order to use the admin application.admin.E406:
django.contrib.messagesmust be inINSTALLED_APPSin order to use the admin application.admin.E408:
django.contrib.auth.middleware.AuthenticationMiddlewaremust be inMIDDLEWAREin order to use the admin application.admin.E409:
django.contrib.messages.middleware.MessageMiddlewaremust be inMIDDLEWAREin order to use the admin application.admin.E410:
django.contrib.sessions.middleware.SessionMiddlewaremust be inMIDDLEWAREin order to use the admin application.
authLink to this heading
auth.E001:
REQUIRED_FIELDSmust be a list or tuple.auth.E002: The field named as the
USERNAME_FIELDfor a custom user model must not be included inREQUIRED_FIELDS.auth.E003:
<field>must be unique because it is named as theUSERNAME_FIELD.auth.W004:
<field>is named as theUSERNAME_FIELD, but it is not unique.auth.E005: The permission codenamed
<codename>clashes with a builtin permission for model<model>.auth.E006: The permission codenamed
<codename>is duplicated for model<model>.auth.E007: The
verbose_nameof model<model>must be at most 244 characters for its builtin permission names to be at most 255 characters.auth.E008: The permission named
<name>of model<model>is longer than 255 characters.auth.C009:
<User model>.is_anonymousmust be an attribute or property rather than a method. Ignoring this is a security issue as anonymous users will be treated as authenticated!auth.C010:
<User model>.is_authenticatedmust be an attribute or property rather than a method. Ignoring this is a security issue as anonymous users will be treated as authenticated!
contenttypesLink to this heading
The following checks are performed when a model contains a
GenericForeignKey or
GenericRelation:
contenttypes.E001: The
GenericForeignKeyobject ID references the nonexistent field<field>.contenttypes.E002: The
GenericForeignKeycontent type references the nonexistent field<field>.contenttypes.E003:
<field>is not aForeignKey.contenttypes.E004:
<field>is not aForeignKeytocontenttypes.ContentType.contenttypes.E005: Model names must be at most 100 characters.
postgresLink to this heading
The following checks are performed on django.contrib.postgres model
fields:
postgres.E001: Base field for array has errors: ...
postgres.E002: Base field for array cannot be a related field.
postgres.E003:
<field>default should be a callable instead of an instance so that it's not shared between all field instances.
sitesLink to this heading
The following checks are performed on any model using a
CurrentSiteManager:
sites.E001:
CurrentSiteManagercould not find a field named<field name>.sites.E002:
CurrentSiteManagercannot use<field>as it is not a foreign key or a many-to-many field.
staticfilesLink to this heading
The following checks verify that django.contrib.staticfiles is correctly
configured:
staticfiles.E001: The
STATICFILES_DIRSsetting is not a tuple or list.staticfiles.E002: The
STATICFILES_DIRSsetting should not contain theSTATIC_ROOTsetting.staticfiles.E003: The prefix
<prefix>in theSTATICFILES_DIRSsetting must not end with a slash.