peewee Documentation Release 2.10.2more Model classes: from peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database is a convention you should follow – even though the table will contain multiple people, we always name the class using the singular form. There are lots of field types suitable for storing various types is easy to do with peewee: class Pet(Model): owner = ForeignKeyField(Person, related_name='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model0 码力 | 275 页 | 276.96 KB | 1 年前3
peewee Documentation
Release 2.10.2more Model classes: from peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This is a convention you should follow – even though the table will contain multiple people, we always name the class using the singular form. There are lots of field types suitable for storing various types This is easy to do with peewee: class Pet(Model): owner = ForeignKeyField(Person, related_name='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses the "people0 码力 | 221 页 | 844.06 KB | 1 年前3
peewee Documentation Release 3.0.0more Model classes: from peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database is a convention you should follow – even though the table will contain multiple people, we always name the class using the singular form. There are lots of field types suitable for storing various types easy to do with peewee: class Pet(Model): owner = ForeignKeyField(Person, backref='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses0 码力 | 319 页 | 361.50 KB | 1 年前3
peewee Documentation
Release 3.5.0more Model classes: from peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database is a convention you should follow – even though the table will contain multiple people, we always name the class using the singular form. There are lots of field types suitable for storing various types easy to do with peewee: class Pet(Model): owner = ForeignKeyField(Person, backref='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0more Model classes: from peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database is a convention you should follow – even though the table will contain multiple people, we always name the class using the singular form. There are lots of field types suitable for storing various types easy to do with peewee: class Pet(Model): owner = ForeignKeyField(Person, backref='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation Release 3.1.0more Model classes: from peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database is a convention you should follow – even though the table will contain multiple people, we always name the class using the singular form. There are lots of field types suitable for storing various types easy to do with peewee: class Pet(Model): owner = ForeignKeyField(Person, backref='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses0 码力 | 332 页 | 370.77 KB | 1 年前3
peewee Documentation
Release 3.5.0more Model classes: from peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This is a convention you should follow – even though the table will contain multiple people, we always name the class using the singular form. There are lots of field types suitable for storing various types This is easy to do with peewee: class Pet(Model): owner = ForeignKeyField(Person, backref='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses the "people.db"0 码力 | 282 页 | 1.02 MB | 1 年前3
peewee Documentation
Release 3.4.0more Model classes: from peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This is a convention you should follow – even though the table will contain multiple people, we always name the class using the singular form. There are lots of field types suitable for storing various types This is easy to do with peewee: class Pet(Model): owner = ForeignKeyField(Person, backref='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses the "people.db"0 码力 | 284 页 | 1.03 MB | 1 年前3
peewee Documentation
Release 3.3.0more Model classes: from peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() is_relative = BooleanField() class Meta: database = db # This is a convention you should follow – even though the table will contain multiple people, we always name the class using the singular form. There are lots of field types suitable for storing various types This is easy to do with peewee: class Pet(Model): owner = ForeignKeyField(Person, backref='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses the "people.db"0 码力 | 280 页 | 1.02 MB | 1 年前3
peewee Documentation Release 3.6.0more Model classes: from peewee import * db = SqliteDatabase('people.db') class Person(Model): name = CharField() birthday = DateField() class Meta: database = db # This model uses the is a convention you should follow – even though the table will contain multiple people, we always name the class using the singular form. There are lots of field types suitable for storing various types This is simple with peewee: class Pet(Model): owner = ForeignKeyField(Person, backref='pets') name = CharField() animal_type = CharField() class Meta: database = db # this model uses0 码力 | 377 页 | 399.12 KB | 1 年前3
共 16 条
- 1
- 2













