Debian Codegraph @

django/contrib/sites/checks.py

raw
1 from types import NoneType
2
3 from django.conf import settings
4 from django.core.checks import Error
5
6
7 def check_site_id(app_configs, **kwargs):
8 if hasattr(settings, "SITE_ID") and not isinstance(
9 settings.SITE_ID, (NoneType, int)
10 ):
11 return [
12 Error("The SITE_ID setting must be an integer", id="sites.E101"),
13 ]
14 return []