You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
643 B

  1. from django.apps import AppConfig
  2. from django.contrib.admin.checks import check_admin_app
  3. from django.core import checks
  4. from django.utils.translation import ugettext_lazy as _
  5. class SimpleAdminConfig(AppConfig):
  6. """Simple AppConfig which does not do automatic discovery."""
  7. name = 'django.contrib.admin'
  8. verbose_name = _("Administration")
  9. def ready(self):
  10. checks.register(check_admin_app, checks.Tags.admin)
  11. class AdminConfig(SimpleAdminConfig):
  12. """The default AppConfig for admin which does autodiscovery."""
  13. def ready(self):
  14. super(AdminConfig, self).ready()
  15. self.module.autodiscover()