-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the json_iso_utc serializer in all dashboard endpoints
This will return dates with timezone information
- Loading branch information
Showing
7 changed files
with
19 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
from datetime import datetime | ||
|
||
import sqlalchemy as sa | ||
from sqlalchemy.orm import Mapped, mapped_column | ||
|
||
|
||
class CreatedUpdatedMixin: | ||
created = sa.Column(sa.DateTime(), server_default=sa.func.now(), nullable=False) | ||
updated = sa.Column( | ||
sa.DateTime(), | ||
server_default=sa.func.now(), | ||
onupdate=sa.func.now(), | ||
nullable=False, | ||
created: Mapped[datetime] = mapped_column(server_default=sa.func.now()) | ||
updated: Mapped[datetime] = mapped_column( | ||
server_default=sa.func.now(), onupdate=sa.func.now() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters