peewee Documentation Release 3.6.0
Async with Gevent Framework Integration Executing Queries Managing Transactions Database Errors Logging queries Adding a new Database Driver Models and Fields Fields Creating model tables Model options All of these error classes extend PeeweeException. Logging queries All queries are logged to the peewee namespace using the standard library logging module. Queries are logged using the DEBUG level. If handler. # Print all queries to stderr. import logging logger = logging.getLogger('peewee') logger.addHandler(logging.StreamHandler()) logger.setLevel(logging.DEBUG) Adding a new Database Driver Peewee0 码力 | 377 页 | 399.12 KB | 1 年前3peewee Documentation Release 3.6.0
these error classes extend PeeweeException. 1.5.16 Logging queries All queries are logged to the peewee namespace using the standard library logging module. Queries are logged using the DEBUG level. If handler. # Print all queries to stderr. import logging logger = logging.getLogger('peewee') logger.addHandler(logging.StreamHandler()) logger.setLevel(logging.DEBUG) 40 Chapter 1. Contents: peewee Documentation IntegerField() # Insert a new user. User.create(username='huey', login_count=0) # Simulate the user logging in. The login count and timestamp will be # either created or updated correctly. now = datetime.now()0 码力 | 302 页 | 1.02 MB | 1 年前3peewee Documentation Release 2.10.2
initialization Advanced Connection Management Using multiple databases Database Errors Automatic Reconnect Logging queries Generating skeleton code Adding a new Database Driver Models and Fields Fields Creating MySQLDatabase): pass db = MyRetryDB('my_app') Logging queries All queries are logged to the peewee namespace using the standard library logging module. Queries are logged using the DEBUG level. If a handler. # Print all queries to stderr. import logging logger = logging.getLogger('peewee') logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) Generating skeleton code For writing0 码力 | 275 页 | 276.96 KB | 1 年前3peewee Documentation Release 2.10.2
MySQLDatabase): pass db = MyRetryDB('my_app') 1.6.20 Logging queries All queries are logged to the peewee namespace using the standard library logging module. Queries are logged using the DEBUG level. If a handler. # Print all queries to stderr. import logging logger = logging.getLogger('peewee') logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) 1.6. Managing your Database 33 command line. Here is a more complete example, which will use the PostgresqlExtDatabase with query logging enabled: pskel -l -e postgres_ext -d my_database User Tweet > my_script.py You can now fill in0 码力 | 221 页 | 844.06 KB | 1 年前3peewee Documentation Release 3.5.0
Async with Gevent Framework Integration Executing Queries Managing Transactions Database Errors Logging queries Adding a new Database Driver Models and Fields Fields Creating model tables Model options All of these error classes extend PeeweeException. Logging queries All queries are logged to the peewee namespace using the standard library logging module. Queries are logged using the DEBUG level. If handler. # Print all queries to stderr. import logging logger = logging.getLogger('peewee') logger.addHandler(logging.StreamHandler()) logger.setLevel(logging.DEBUG) Adding a new Database Driver Peewee0 码力 | 347 页 | 380.80 KB | 1 年前3peewee Documentation Release 3.4.0
Async with Gevent Framework Integration Executing Queries Managing Transactions Database Errors Logging queries Adding a new Database Driver Models and Fields Fields Field-naming conflicts Creating model All of these error classes extend PeeweeException. Logging queries All queries are logged to the peewee namespace using the standard library logging module. Queries are logged using the DEBUG level. If a handler. # Print all queries to stderr. import logging logger = logging.getLogger('peewee') logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) Adding a new Database Driver Peewee0 码力 | 349 页 | 382.34 KB | 1 年前3peewee Documentation Release 3.0.0
Connection Pooling Framework Integration Executing Queries Managing Transactions Database Errors Logging queries Adding a new Database Driver Models and Fields Fields Creating model tables Model options All of these error classes extend PeeweeException. Logging queries All queries are logged to the peewee namespace using the standard library logging module. Queries are logged using the DEBUG level. If a handler. # Print all queries to stderr. import logging logger = logging.getLogger('peewee') logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) Adding a new Database Driver Peewee0 码力 | 319 页 | 361.50 KB | 1 年前3peewee Documentation Release 3.1.0
Peewee Applications Framework Integration Executing Queries Managing Transactions Database Errors Logging queries Adding a new Database Driver Models and Fields Fields Creating model tables Model options All of these error classes extend PeeweeException. Logging queries All queries are logged to the peewee namespace using the standard library logging module. Queries are logged using the DEBUG level. If a handler. # Print all queries to stderr. import logging logger = logging.getLogger('peewee') logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) Adding a new Database Driver Peewee0 码力 | 332 页 | 370.77 KB | 1 年前3peewee Documentation Release 3.5.0
these error classes extend PeeweeException. 1.5.16 Logging queries All queries are logged to the peewee namespace using the standard library logging module. Queries are logged using the DEBUG level. If handler. # Print all queries to stderr. import logging logger = logging.getLogger('peewee') logger.addHandler(logging.StreamHandler()) logger.setLevel(logging.DEBUG) 40 Chapter 1. Contents: peewee Documentation IntegerField() # Insert a new user. User.create(username='huey', login_count=0) # Simulate the user logging in. The login count and timestamp will be # either created or updated correctly. now = datetime.now()0 码力 | 282 页 | 1.02 MB | 1 年前3peewee Documentation Release 3.4.0
these error classes extend PeeweeException. 1.6.16 Logging queries All queries are logged to the peewee namespace using the standard library logging module. Queries are logged using the DEBUG level. If a handler. # Print all queries to stderr. import logging logger = logging.getLogger('peewee') logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) 60 Chapter 1. Contents: peewee IntegerField() # Insert a new user. User.create(username='huey', login_count=0) # Simulate the user logging in. The login count and timestamp will be # either created or updated correctly. now = datetime.now()0 码力 | 284 页 | 1.03 MB | 1 年前3
共 11 条
- 1
- 2