Change Duck definition
This commit is contained in:
parent
70a5a99909
commit
4cb80df58a
16
models.py
16
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 "<User(name='%s', fullname='%s', password='%s')>" % (
|
||||
|
Loading…
Reference in New Issue
Block a user