Changeset 484:2c4a827a0317

Show
Ignore:
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:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • microfacts/model/core.py

    r462 r484  
    2525### VDM-specific tables 
    2626 
    27 state_table = vdm.sqlalchemy.make_state_table(metadata) 
    2827revision_table = vdm.sqlalchemy.make_revision_table(metadata) 
    2928 
     
    131130        if query is None: 
    132131            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) 
    135133        return q 
    136134 
     
    224222 
    225223# VDM-specific domain objects 
    226 State = vdm.sqlalchemy.make_State(mapper, state_table) 
     224State = vdm.sqlalchemy.State 
    227225Revision = vdm.sqlalchemy.make_Revision(mapper, revision_table) 
    228226# add a purge function onto Revision object ... 
  • microfacts/templates/factlet/read_core.html

    r461 r484  
    1515    <h3 class="title">${c.factlet.title}</h3> 
    1616 
    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 
    1818      Factlet is Deleted!</h2> 
    1919