PWeb Model Manual
PWeb Model Manual will describe all related things with Model.
PWeb Model Data Type
Data Type | Description |
---|---|
Integer | an integer |
String(size) | a string with a maximum length (optional in some databases, e.g. PostgreSQL) |
Text | some longer unicode text |
DateTime | date and time expressed as Python datetime object. |
Float | stores floating point values |
Boolean | stores a boolean value |
PickleType | stores a pickled Python object |
LargeBinary | stores large arbitrary binary data |
PWeb Model Column Attribute
Data Type | Example | Description |
---|---|---|
unique | unique=True | When True, indicates that this column contains a unique constraint |
nullable | nullable=False | When set to False, will cause the 'NOT NULL' phrase to be added when generating DDL for the column. |
index | index=True | When True, indicates that the column is indexed. |
primary_key | primary_key=True | If True, marks this column as a primary key column. Multiple columns can have this flag set to specify composite primary keys. |
default | The default value for this column |