From 4cb80df58aa19cd49cfe92b0804c3c2f216b4586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Barna?= Date: Fri, 28 Oct 2016 11:51:06 +0200 Subject: [PATCH] Change Duck definition --- models.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/models.py b/models.py index 1d2229a..8c1ca0e 100644 --- a/models.py +++ b/models.py @@ -1,14 +1,20 @@ -from sqlalchemy import Column, Integer, String +import sqlalchemy as sa +import sqlalchemy.orm as orm from sqlalchemy.ext.declarative import declarative_base +#from flask.ext.login import UserMixin +#from sqlalchemy_login_models.model import Base, UserKey, User as SLM_User + +__all__ = ['Duck'] Base = declarative_base() class Duck( Base ): - __tablename__ = 'users' + __tablename__ = 'duck' + __name__ = "duck" - duck_id = Column( Integer, primary_key=True ) - name = Column( String ) - color = Column( String ) + duck_id = sa.Column( sa.Integer, primary_key=True ) + name = sa.Column( sa.String ) + color = sa.Column( sa.String ) def __repr__(self): return "" % (