peewee Documentation
Release 0.9.7peewee . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Peewee Cookbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . suite. python setup.py test Feel free to check out the Example app which ships with the project. 1.3 Peewee Cookbook Below are outlined some of the ways to perform typical database-related tasks with class Meta: database = psql_db class Blog(PostgresqlModel): creator = peewee.CharField() # etc, etc 1.3. Peewee Cookbook 5 peewee Documentation, Release 0.9.7 Using with MySQL Point models at an instance0 码力 | 53 页 | 347.03 KB | 1 年前3
peewee Documentation
Release 1.0.0suite. python setup.py test Feel free to check out the Example app which ships with the project. 1.3 Peewee Cookbook Below are outlined some of the ways to perform typical database-related tasks with db’) class CustomModel(peewee.Model): class Meta: database = custom_db class Blog(CustomModel): 1.3. Peewee Cookbook 5 peewee Documentation, Release 1.0.0 creator = peewee.CharField() name = peewee will result in an UPDATE rather than another INSERT: >>> blog.save() >>> blog.id 2 >>> blog.save() 1.3. Peewee Cookbook 7 peewee Documentation, Release 1.0.0 >>> blog.id 2 If you want to update multiple0 码力 | 71 页 | 405.29 KB | 1 年前3
peewee Documentation
Release 3.5.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Example app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . That’s it for the quickstart. If you want to look at a full web-app, check out the Example app. 1.3 Example app We’ll be building a simple twitter-like site. The source code for the example can be found you don’t have flask already, you will need to install it to run the example: pip install flask 1.3. Example app 11 peewee Documentation, Release 3.5.0 1.3.1 Running the example After ensuring that0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.3.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Example app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . That’s it for the quickstart. If you want to look at a full web-app, check out the Example app. 1.3 Example app We’ll be building a simple twitter-like site. The source code for the example can be found you don’t have flask already, you will need to install it to run the example: pip install flask 1.3. Example app 11 peewee Documentation, Release 3.3.0 1.3.1 Running the example After ensuring that0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Example app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . That’s it for the quickstart. If you want to look at a full web-app, check out the Example app. 1.3 Example app We’ll be building a simple twitter-like site. The source code for the example can be found you don’t have flask already, you will need to install it to run the example: pip install flask 1.3. Example app 11 peewee Documentation, Release 3.4.0 1.3.1 Running the example After ensuring that0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation
Release 2.10.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Example app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . That’s it for the quickstart. If you want to look at a full web-app, check out the Example app. 1.3 Example app We’ll be building a simple twitter-like site. The source code for the example can be found querying and joining # on different columns we can expose who a user is "related to" and who is 1.3. Example app 11 peewee Documentation, Release 2.10.2 # "related to" a given user class Relationship(BaseModel):0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation
Release 3.6.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Example app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . That’s it for the quickstart. If you want to look at a full web-app, check out the Example app. 1.3 Example app We’ll be building a simple twitter-like site. The source code for the example can be found flask is installed, cd into the twitter example directory and execute the run_example.py script: 1.3. Example app 11 peewee Documentation, Release 3.6.0 python run_example.py The example app will be0 码力 | 302 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 2.0.2suite. python setup.py test Feel free to check out the Example app which ships with the project. 1.3 Upgrading peewee Peewee went from 2319 SLOC to 1666. 1.3.1 Goals for the new API • consistent: there have to use your imagination): # 1.0 Counter.update(count=F(’count’) + 1).where(url=request.url) 1.3. Upgrading peewee 5 peewee Documentation, Release 2.0.0 # 2.0 Counter.update(count=Counter.count0 码力 | 65 页 | 315.33 KB | 1 年前3
共 8 条
- 1













