Skip to content

Commit

Permalink
feat(apis_metainfo): print warning when APIS_BASE_URI is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Sep 18, 2024
1 parent 217ca90 commit 1727387
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apis_core/apis_metainfo/apps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
from django.apps import AppConfig
from django.conf import settings
import logging

logger = logging.getLogger(__name__)


class MetainfoConfig(AppConfig):
default_auto_field = "django.db.models.AutoField"
name = "apis_core.apis_metainfo"

def ready(self):
if getattr(settings, "APIS_BASE_URI", None) is None:
logger.warning(
"You should set the APIS_BASE_URI setting - we are using https://example.org as a fallback!"
)

0 comments on commit 1727387

Please sign in to comment.