peewee Documentation Release 2.10.2that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its def after_request(response): database.close() return response Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making file manager with Flask, peewee and S3 [http://charlesleifer.com/blog/web-based-encrypted-file-storage-using-flask-and-aws/]. Creating a bookmarking web-service that takes screenshots of your bookmarks0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 2.10.2that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its fields after_request def after_request(response): database.close() return response Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. 1.3 db_url import connect # Connect to the database URL defined in the environment, falling # back to a local Sqlite database if no database URL is specified. db = connect(os.environ.get('DATABASE') or 'sqlite:///default0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation
Release 3.5.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its def after_request(response): database.close() return response Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making db_url import connect # Connect to the database URL defined in the environment, falling # back to a local Sqlite database if no database URL is specified. db = connect(os.environ.get('DATABASE') or 'sqlite:///default0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its def after_request(response): database.close() return response Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making db_url import connect # Connect to the database URL defined in the environment, falling # back to a local Sqlite database if no database URL is specified. db = connect(os.environ.get('DATABASE') or 'sqlite:///default0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation Release 3.0.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its def after_request(response): database.close() return response Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making db_url import connect # Connect to the database URL defined in the environment, falling # back to a local Sqlite database if no database URL is specified. db = connect(os.environ.get('DATABASE') or 'sqlite:///default0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation
Release 3.5.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its fields after_request def after_request(response): database.close() return response Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making db_url import connect # Connect to the database URL defined in the environment, falling # back to a local Sqlite database if no database URL is specified. db = connect(os.environ.get('DATABASE') or 'sqlite:///default0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.3.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its fields after_request def after_request(response): database.close() return response Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making db_url import connect # Connect to the database URL defined in the environment, falling # back to a local Sqlite database if no database URL is specified. db = connect(os.environ.get('DATABASE') or 'sqlite:///default0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its fields after_request def after_request(response): database.close() return response Note: Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making db_url import connect # Connect to the database URL defined in the environment, falling # back to a local Sqlite database if no database URL is specified. db = connect(os.environ.get('DATABASE') or 'sqlite:///default0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation Release 3.1.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its def after_request(response): database.close() return response Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making db_url import connect # Connect to the database URL defined in the environment, falling # back to a local Sqlite database if no database URL is specified. db = connect(os.environ.get('DATABASE') or 'sqlite:///default0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation Release 3.6.0that specifies which database to use. then, any subclasses will automatically # use the correct storage. class BaseModel(Model): class Meta: database = database # the user model specifies its def after_request(response): database.close() return response Note Peewee uses thread local storage to manage connection state, so this pattern can be used with multi-threaded WSGI servers. Making db_url import connect # Connect to the database URL defined in the environment, falling # back to a local Sqlite database if no database URL is specified. db = connect(os.environ.get('DATABASE') or 'sqlite:///default0 码力 | 377 页 | 399.12 KB | 1 年前3
共 16 条
- 1
- 2













