标签: django
数据库连接代码,您能帮助我更好地逐行了解它
//import from django.db import connections from django.db.utils import OperationalError db_conn = connections['default'] try: c = db_conn.cursor() except OperationalError: connected = False else: connected = True