| 1 | | from sqlalchemy import * |
|---|
| 2 | | from sqlalchemy.ext.assignmapper import assign_mapper |
|---|
| 3 | | from turbogears.database import metadata, session |
|---|
| 4 | | from pagoda.models import Revision |
|---|
| 5 | | from pagoda.models.revision_mapper import * |
|---|
| 6 | | |
|---|
| 7 | | __all__ = ['textcontainer_generic_table', 'textcontainer_localized_table', |
|---|
| 8 | | 'textcontainer_table', 'TextContainer'] |
|---|
| 9 | | |
|---|
| 10 | | textcontainer_generic_table = Table('textcontainer_generic', metadata, |
|---|
| 11 | | Column('revision_id', None, ForeignKey(Revision.c.revision_id), |
|---|
| 12 | | primary_key=True |
|---|
| 13 | | ), |
|---|
| 14 | | Column('container_name', Unicode(75), nullable=False), |
|---|
| 15 | | Column('editor_name', String(75), nullable=True) |
|---|
| 16 | | ) |
|---|
| 17 | | |
|---|
| 18 | | textcontainer_localized_table = Table('textcontainer_localized', metadata, |
|---|
| 19 | | Column('revision_id', None, ForeignKey(Revision.c.revision_id), |
|---|
| 20 | | primary_key=True |
|---|
| 21 | | ), |
|---|
| 22 | | Column('content_locale', String(8), nullable=False), |
|---|
| 23 | | Column('text', Unicode, nullable=False, default="") |
|---|
| 24 | | ) |
|---|
| 25 | | |
|---|
| 26 | | # textcontainer_table = revisioned_table('textcontainer', |
|---|
| 27 | | # textcontainer_generic_table, textcontainer_localized_table |
|---|
| | 1 | # from sqlalchemy import * |
|---|
| | 2 | # from sqlalchemy.ext.assignmapper import assign_mapper |
|---|
| | 3 | # from turbogears.database import metadata, session |
|---|
| | 4 | # from pagoda.models import Revision |
|---|
| | 5 | # from pagoda.models.revision_mapper import * |
|---|
| | 6 | # |
|---|
| | 7 | # __all__ = ['textcontainer_generic_table', 'textcontainer_localized_table', |
|---|
| | 8 | # 'textcontainer_table', 'TextContainer'] |
|---|
| | 9 | # |
|---|
| | 10 | # textcontainer_generic_table = Table('textcontainer_generic', metadata, |
|---|
| | 11 | # Column('revision_id', None, ForeignKey(Revision.c.revision_id), |
|---|
| | 12 | # primary_key=True |
|---|
| | 13 | # ), |
|---|
| | 14 | # Column('container_name', Unicode(75), nullable=False), |
|---|
| | 15 | # Column('editor_name', String(75), nullable=True) |
|---|
| 29 | | |
|---|
| 30 | | class TextContainer(Revision): |
|---|
| 31 | | pass |
|---|
| 32 | | |
|---|
| 33 | | # revision_mapper(session.context, TextContainer, textcontainer_table) |
|---|
| | 17 | # |
|---|
| | 18 | # textcontainer_localized_table = Table('textcontainer_localized', metadata, |
|---|
| | 19 | # Column('revision_id', None, ForeignKey(Revision.c.revision_id), |
|---|
| | 20 | # primary_key=True |
|---|
| | 21 | # ), |
|---|
| | 22 | # Column('content_locale', String(8), nullable=False), |
|---|
| | 23 | # Column('text', Unicode, nullable=False, default="") |
|---|
| | 24 | # ) |
|---|
| | 25 | # |
|---|
| | 26 | # # textcontainer_table = revisioned_table('textcontainer', |
|---|
| | 27 | # # textcontainer_generic_table, textcontainer_localized_table |
|---|
| | 28 | # # ) |
|---|
| | 29 | # |
|---|
| | 30 | # class TextContainer(Revision): |
|---|
| | 31 | # pass |
|---|
| | 32 | # |
|---|
| | 33 | # # revision_mapper(session.context, TextContainer, textcontainer_table) |
|---|