Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

flask sqlalchemy json

class Base(object):
    def as_dict(self):
        return dict((c.name,
                     getattr(self, c.name))
                     for c in self.__table__.columns)


Base = declarative_base(cls=Base)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flask #sqlalchemy #json
ADD COMMENT
Topic
Name
3+2 =