From bdfd97fc1255923724b962c26c44930f16bd0bb4 Mon Sep 17 00:00:00 2001 From: Jakub Miazek Date: Sat, 23 Apr 2022 21:04:56 +0200 Subject: [PATCH] add new models to declarative base --- the_app/models/__init__.py | 1 + the_app/models/shakespeare.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/the_app/models/__init__.py b/the_app/models/__init__.py index 9a6ae8f..63287f6 100644 --- a/the_app/models/__init__.py +++ b/the_app/models/__init__.py @@ -1,2 +1,3 @@ from the_app.models.nonsense import Nonsense # noqa from the_app.models.stuff import Stuff # noqa +from the_app.models.shakespeare import Character # noqa diff --git a/the_app/models/shakespeare.py b/the_app/models/shakespeare.py index 3d76ff1..804c4bb 100644 --- a/the_app/models/shakespeare.py +++ b/the_app/models/shakespeare.py @@ -1,9 +1,9 @@ from sqlalchemy import (Column, ForeignKeyConstraint, Integer, PrimaryKeyConstraint, String, Table, Text, - UniqueConstraint) -from sqlalchemy.orm import declarative_base, relationship + UniqueConstraint, ForeignKey) +from sqlalchemy.orm import relationship -Base = declarative_base() +from the_app.models.base import Base metadata = Base.metadata