peewee Documentation Release 2.10.2columns. For the twitter clone, there are just three models: User: Represents a user account and stores the username and password, an email address for generating avatars using gravatar, and a datetime that contains two foreign-keys to the User model and stores which users follow one another. Message: Analagous to a tweet. The Message model stores the text content of the tweet, when it was created, MySQL database my_db. More examples in the db_url documentation. Multi-threaded applications peewee stores the connection state in a thread local, so each thread gets its own separate connection. If you prefer0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation Release 1.0.0threadlocals=True: concurrent_db = SqliteDatabase('stats.db', threadlocals=True) The above implementation stores connection state in a thread local and will only use that connection for a given thread. Sqlite can schema. For the twitter clone, there are just three models: User: represents a user account and stores the username and password, an email address for generating avatars using gravatar, and a datetime foreign-keys to the User model and represents “following”. Message: analagous to a tweet. this model stores the text content of the message, when it was created, and who posted it (foreign key to User). If0 码力 | 101 页 | 163.20 KB | 1 年前3
peewee Documentation Release 0.9.7schema. For the twitter clone, there are just three models: User: represents a user account and stores the username and password, an email address for generating avatars using gravatar, and a datetime foreign-keys to the User model and represents “following”. Message: analagous to a tweet. this model stores the text content of the message, when it was created, and who posted it (foreign key to User). If exists on has been created. class CharField Stores: small strings (0-255 bytes) class TextField Stores: arbitrarily large strings class DateTimeField Stores: python datetime.datetime instances Accepts0 码力 | 78 页 | 143.68 KB | 1 年前3
Pro Git 2nd Edition 2.1.413you know all about Git and can wield it with power and grace, you can move on to discuss how Git stores its objects, what the object model is, details of packfiles, server protocols, and more. Throughout when using the tool. Even though Git’s user interface is fairly similar to these other VCSs, Git stores and thinks about information in a very different way, and understanding these differences will your project, Git basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. To be efficient, if files have not changed, Git doesn’t store the0 码力 | 731 页 | 21.49 MB | 1 年前3
Pro Git 2nd Edition 2.1.413 you know all about Git and can wield it with power and grace, you can move on to discuss how Git stores its objects, what the object model is, details of packfiles, server protocols, and more. Throughout when using the tool. Even though Git’s user interface is fairly similar to these other VCSs, Git stores and thinks about information in a very different way, and understanding these differences will your project, Git basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. To be efficient, if files have not changed, Git doesn’t store the0 码力 | 691 页 | 13.35 MB | 1 年前3
Django 2.2.x Documentationnew ones) and that you’d like the changes to be stored as a migration. Migrations are how Django stores changes to your models (and thus your database schema) - they’re just files on disk. You can read wanted to know the lowest and highest price of any book that is available for sale in any of the stores, you could use the aggregate: >>> Store.objects.aggregate(min_price=Min('books__price'), max_pr matters because a middleware can depend on other middleware. For instance, AuthenticationMiddleware stores the authenticated user in the session; therefore, it must run after SessionMiddleware. See Middleware0 码力 | 2915 页 | 2.83 MB | 1 年前3
Django 2.1.x Documentationnew ones) and that you’d like the changes to be stored as a migration. Migrations are how Django stores changes to your models (and thus your database schema) - they’re just files on disk. You can read wanted to know the lowest and highest price of any book that is available for sale in any of the stores, you could use the aggregate: >>> Store.objects.aggregate(min_price=Min('books__price'), max_pr matters because a middleware can depend on other middleware. For instance, AuthenticationMiddleware stores the authenticated user in the session; therefore, it must run after SessionMiddleware. See Middleware0 码力 | 2790 页 | 2.71 MB | 1 年前3
Django 4.2.x Documentationnew ones) and that you’d like the changes to be stored as a migration. Migrations are how Django stores changes to your models (and thus your database schema) - they’re files on disk. You can read the wanted to know the lowest and highest price of any book that is available for sale in any of the stores, you could use the aggregate: >>> Store.objects.aggregate(min_price=Min("books__price"), max_pr matters because a middleware can depend on other middleware. For instance, AuthenticationMiddleware stores the authenticated user in the session; therefore, it must run after SessionMiddleware. See Middleware0 码力 | 3305 页 | 3.16 MB | 1 年前3
Django 4.1.x Documentationnew ones) and that you’d like the changes to be stored as a migration. Migrations are how Django stores changes to your models (and thus your database schema) - they’re files on disk. You can read the wanted to know the lowest and highest price of any book that is available for sale in any of the stores, you could use the aggregate: >>> Store.objects.aggregate(min_price=Min('books__price'), max_pr matters because a middleware can depend on other middleware. For instance, AuthenticationMiddleware stores the authenticated user in the session; therefore, it must run after SessionMiddleware. See Middleware0 码力 | 3240 页 | 3.13 MB | 1 年前3
Django 4.0.x Documentationnew ones) and that you’d like the changes to be stored as a migration. Migrations are how Django stores changes to your models (and thus your database schema) - they’re files on disk. You can read the wanted to know the lowest and highest price of any book that is available for sale in any of the stores, you could use the aggregate: >>> Store.objects.aggregate(min_price=Min('books__price'), max_pr matters because a middleware can depend on other middleware. For instance, AuthenticationMiddleware stores the authenticated user in the session; therefore, it must run after SessionMiddleware. See Middleware0 码力 | 3184 页 | 3.14 MB | 1 年前3
共 468 条
- 1
- 2
- 3
- 4
- 5
- 6
- 47













