2014-01-05 05:49:35 +08:00
|
|
|
from django.apps import AppConfig
|
2022-05-17 15:46:26 +08:00
|
|
|
from django.urls import get_resolver, get_urlconf
|
2017-01-27 03:58:33 +08:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
2014-01-05 05:49:35 +08:00
|
|
|
|
2022-05-17 15:46:26 +08:00
|
|
|
from .utils import _active, register_callback
|
|
|
|
|
2014-01-05 05:49:35 +08:00
|
|
|
|
|
|
|
class AdminDocsConfig(AppConfig):
|
|
|
|
name = "django.contrib.admindocs"
|
2014-03-06 23:03:25 +08:00
|
|
|
verbose_name = _("Administrative Documentation")
|
2022-05-17 15:46:26 +08:00
|
|
|
|
|
|
|
def ready(self):
|
|
|
|
urlconf = get_urlconf()
|
|
|
|
urlresolver = get_resolver(urlconf)
|
|
|
|
register_callback(urlresolver, _active.local_value)
|