* feat: style admin site in dev mode * refactor: eliminate base_site.html * fix: remove debug * fix: commit missing __init__.py * refactor: make method static; fix tests * refactor: move api init to AppConfig.ready() Avoids interacting with the app registry before it's ready.
16 lines
476 B
Python
16 lines
476 B
Python
from django.apps import AppConfig
|
|
from . import populate_api_list
|
|
|
|
|
|
class ApiConfig(AppConfig):
|
|
name = "ietf.api"
|
|
|
|
def ready(self):
|
|
"""Hook to do init after the app registry is fully populated
|
|
|
|
Importing models or accessing the app registry is ok here, but do not
|
|
interact with the database. See
|
|
https://docs.djangoproject.com/en/4.2/ref/applications/#django.apps.AppConfig.ready
|
|
"""
|
|
populate_api_list()
|