Changeset 2959

Show
Ignore:
Timestamp:
02/23/07 23:54:50 (2 years ago)
Author:
mscott
Message:

working transaction execution and entity viewing for simple extents

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/controllers/entities.py

    r2953 r2959  
    4040        pass 
    4141     
    42     def show(self, id, format='html'): 
     42    def show(self, db_id, extent_id, id, format='html'): 
    4343        """GET /id: Show a specific item.""" 
    4444        # url_for('entity', id=ID) 
    45         pass 
     45        c.db = db = self.dbs[db_id] 
     46        c.db_id = db_id 
     47        c.extent = extent = db.extent(extent_id) 
     48        c.entity = extent[int(id)] 
     49        return render_response('/entities/show.html') 
    4650     
    4751    def edit(self, id, format='html'): 
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/controllers/transactions.py

    r2958 r2959  
    6666        """POST /id;execute: Execute a transaction.""" 
    6767        # url_for('execute_transaction', id=ID) 
     68        db = self.dbs[db_id] 
    6869        tx = g.tx_cache[id] 
    69          
     70        result = db.execute(tx) 
     71        # XXX: only for entities right now 
     72        return redirect_to(h.url_for( 
     73            'entity', db_id=db_id, extent_id=result.sys.extent.name, 
     74            id=result.sys.oid)) 
  • sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/tests/functional/test_transactions.py

    r2954 r2959  
    7373        # Execute the transaction and follow its redirection. 
    7474        form = response.forms[1] 
    75         # response = form.submit() 
    76         # print dir(response) 
    77         # response = response.follow() 
    78          
     75        response = form.submit() 
     76        response = response.follow()