2014-01-05 05:49:35 +08:00
|
|
|
from django.apps import AppConfig
|
2014-01-25 05:43:00 +08:00
|
|
|
from django.core import checks
|
|
|
|
from django.contrib.auth.checks import check_user_model
|
2014-11-25 20:35:39 +08:00
|
|
|
from django.db.models.signals import post_migrate
|
2014-01-05 05:49:35 +08:00
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
2014-11-25 20:35:39 +08:00
|
|
|
from .management import create_permissions
|
|
|
|
|
2014-01-05 05:49:35 +08:00
|
|
|
|
|
|
|
class AuthConfig(AppConfig):
|
|
|
|
name = 'django.contrib.auth'
|
2014-03-06 23:03:25 +08:00
|
|
|
verbose_name = _("Authentication and Authorization")
|
2014-01-25 05:43:00 +08:00
|
|
|
|
|
|
|
def ready(self):
|
2014-11-25 20:35:39 +08:00
|
|
|
post_migrate.connect(create_permissions,
|
|
|
|
dispatch_uid="django.contrib.auth.management.create_permissions")
|
2014-11-05 14:01:49 +08:00
|
|
|
checks.register(check_user_model, checks.Tags.models)
|