Mercurial > hg > Feedworm
view Mapping.py @ 3:2ac144a98370
add the .hgignore file to ignore .pyc files
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Mon, 26 Apr 2010 17:43:48 +0200 |
parents | 8a624ee48a74 |
children | e0199f383442 |
line wrap: on
line source
from Feed import Feed from sqlalchemy import Column from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import String from sqlalchemy import Table from sqlalchemy.orm import mapper def createMapping(engine): metadata = MetaData(engine) feedTable = Table("feed", metadata, Column("pk", Integer, primary_key=True), Column("name", String(255), nullable=False), Column("url", String(255), nullable=False) ) metadata.create_all() mapper(Feed, feedTable)