Source code django/core/checks/database.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
from django.db import connections

from . import Tags, register


@register(Tags.database)
def check_database_backends(databases=None, **kwargs):
    if databases is None:
        return []
    issues = []
    for alias in databases:
        conn = connections[alias]
        issues.extend(conn.validation.check(**kwargs))
    return issues