diff --git a/django/contrib/admin/apps.py b/django/contrib/admin/apps.py
index a1f4042..3b4f1a3 100644
a
|
b
|
class SimpleAdminConfig(AppConfig):
|
11 | 11 | verbose_name = _("Administration") |
12 | 12 | |
13 | 13 | def ready(self): |
14 | | checks.register('admin')(check_admin_app) |
| 14 | checks.register(checks.Tags.admin)(check_admin_app) |
15 | 15 | |
16 | 16 | |
17 | 17 | class AdminConfig(SimpleAdminConfig): |
diff --git a/django/contrib/auth/apps.py b/django/contrib/auth/apps.py
index f0e169c..254a73d 100644
a
|
b
|
class AuthConfig(AppConfig):
|
10 | 10 | verbose_name = _("Authentication and Authorization") |
11 | 11 | |
12 | 12 | def ready(self): |
13 | | checks.register('models')(check_user_model) |
| 13 | checks.register(checks.Tags.models)(check_user_model) |
diff --git a/django/contrib/contenttypes/apps.py b/django/contrib/contenttypes/apps.py
index fbe4fcc..0462e31 100644
a
|
b
|
class ContentTypesConfig(AppConfig):
|
9 | 9 | verbose_name = _("Content Types") |
10 | 10 | |
11 | 11 | def ready(self): |
12 | | checks.register('models')(check_generic_foreign_keys) |
| 12 | checks.register(checks.Tags.models)(check_generic_foreign_keys) |
diff --git a/django/core/checks/__init__.py b/django/core/checks/__init__.py
index 82a3acf..8983fa7 100644
a
|
b
|
from __future__ import unicode_literals
|
4 | 4 | from .messages import (CheckMessage, |
5 | 5 | Debug, Info, Warning, Error, Critical, |
6 | 6 | DEBUG, INFO, WARNING, ERROR, CRITICAL) |
7 | | from .registry import register, run_checks, tag_exists |
| 7 | from .registry import register, run_checks, tag_exists, Tags |
8 | 8 | |
9 | 9 | # Import these to force registration of checks |
10 | 10 | import django.core.checks.compatibility.django_1_6_0 # NOQA |
… |
… |
__all__ = [
|
14 | 14 | 'CheckMessage', |
15 | 15 | 'Debug', 'Info', 'Warning', 'Error', 'Critical', |
16 | 16 | 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL', |
17 | | 'register', 'run_checks', 'tag_exists', |
| 17 | 'register', 'run_checks', 'tag_exists', 'Tags' |
18 | 18 | ] |
diff --git a/django/core/checks/compatibility/django_1_6_0.py b/django/core/checks/compatibility/django_1_6_0.py
index 06fb113..a805053 100644
a
|
b
|
from __future__ import unicode_literals
|
3 | 3 | |
4 | 4 | from django.apps import apps |
5 | 5 | |
6 | | from .. import Warning, register |
| 6 | from .. import Warning, register, Tags |
7 | 7 | |
8 | 8 | |
9 | | @register('compatibility') |
| 9 | @register(Tags.compatibility) |
10 | 10 | def check_1_6_compatibility(**kwargs): |
11 | 11 | errors = [] |
12 | 12 | errors.extend(_check_test_runner(**kwargs)) |
diff --git a/django/core/checks/model_checks.py b/django/core/checks/model_checks.py
index 46e5c6f..3f5a36b 100644
a
|
b
|
import types
|
6 | 6 | |
7 | 7 | from django.apps import apps |
8 | 8 | |
9 | | from . import Error, register |
| 9 | from . import Error, Tags, register |
10 | 10 | |
11 | 11 | |
12 | | @register('models') |
| 12 | @register(Tags.models) |
13 | 13 | def check_all_models(app_configs=None, **kwargs): |
14 | 14 | errors = [model.check(**kwargs) |
15 | 15 | for model in apps.get_models() |
… |
… |
def check_all_models(app_configs=None, **kwargs):
|
17 | 17 | return list(chain(*errors)) |
18 | 18 | |
19 | 19 | |
20 | | @register('models', 'signals') |
| 20 | @register(Tags.models, Tags.signals) |
21 | 21 | def check_model_signals(app_configs=None, **kwargs): |
22 | 22 | """Ensure lazily referenced model signals senders are installed.""" |
23 | 23 | from django.db import models |
diff --git a/django/core/checks/registry.py b/django/core/checks/registry.py
index 21efbf3..6a656a1 100644
a
|
b
|
from itertools import chain
|
6 | 6 | from django.utils.itercompat import is_iterable |
7 | 7 | |
8 | 8 | |
| 9 | class Tags(object): |
| 10 | """ |
| 11 | Built-in tags for internal checks. |
| 12 | |
| 13 | """ |
| 14 | admin = 'admin' |
| 15 | compatibility = 'compatibility' |
| 16 | models = 'models' |
| 17 | signals = 'signals' |
| 18 | |
| 19 | |
9 | 20 | class CheckRegistry(object): |
10 | 21 | |
11 | 22 | def __init__(self): |