Update dependencies and fix deprecations
This commit is contained in:
parent
0d4fbef13d
commit
19d264a03b
8 changed files with 154 additions and 131 deletions
|
|
@ -10,7 +10,7 @@ __all__ = [
|
|||
]
|
||||
|
||||
|
||||
@as_declarative(name='BaseModel', metadata=MetaData())
|
||||
@as_declarative(metadata=MetaData())
|
||||
class BaseModel:
|
||||
"""
|
||||
Declarative base class for database models.
|
||||
|
|
@ -46,9 +46,9 @@ class BaseModel:
|
|||
"""
|
||||
Return the object's data as a dictionary.
|
||||
|
||||
By default, the dictionary will contain all table columns (with their column name as key) defined in the model. This can be
|
||||
overridden by setting the `fields` and/or `exclude` parameters, in which case only fields that are listed in `fields` will be
|
||||
included in the dictionary, except for fields listed in `exclude`.
|
||||
By default, the dictionary will contain all table columns (with their column name as key) defined in the model.
|
||||
This can be overridden by setting the `fields` and/or `exclude` parameters, in which case only fields that are
|
||||
listed in `fields` will be included in the dictionary, except for fields listed in `exclude`.
|
||||
"""
|
||||
# Determine fields to include in dictionary (starting will all table columns)
|
||||
included_fields = set(column.name for column in self.__table__.columns)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue