Changeset 484:2c4a827a0317
- Timestamp:
- 01/14/10 19:34:31 (8 months ago)
- Author:
- rgrp <http://rufuspollock.org>
- Branch:
- default
- Message:
-
[vdm,migration][s]: migration to new vdm State enum (rather than State object).
- Location:
- microfacts
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r462
|
r484
|
|
| 25 | 25 | ### VDM-specific tables |
| 26 | 26 | |
| 27 | | state_table = vdm.sqlalchemy.make_state_table(metadata) |
| 28 | 27 | revision_table = vdm.sqlalchemy.make_revision_table(metadata) |
| 29 | 28 | |
| … |
… |
|
| 131 | 130 | if query is None: |
| 132 | 131 | query = self.query |
| 133 | | active = State.query.filter_by(name='active').one() |
| 134 | | q = query.filter_by(state=active) |
| | 132 | q = query.filter_by(state=State.ACTIVE) |
| 135 | 133 | return q |
| 136 | 134 | |
| … |
… |
|
| 224 | 222 | |
| 225 | 223 | # VDM-specific domain objects |
| 226 | | State = vdm.sqlalchemy.make_State(mapper, state_table) |
| | 224 | State = vdm.sqlalchemy.State |
| 227 | 225 | Revision = vdm.sqlalchemy.make_Revision(mapper, revision_table) |
| 228 | 226 | # add a purge function onto Revision object ... |
-
|
r461
|
r484
|
|
| 15 | 15 | <h3 class="title">${c.factlet.title}</h3> |
| 16 | 16 | |
| 17 | | <h2 style="color: red;" py:if="c.factlet.state and c.factlet.state.name=='deleted'">This |
| | 17 | <h2 style="color: red;" py:if="c.factlet.state==u'deleted'">This |
| 18 | 18 | Factlet is Deleted!</h2> |
| 19 | 19 | |