Changeset 2935
- Timestamp:
- 02/21/07 14:20:16 (2 years ago)
- Files:
-
- sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/config/routing.py (modified) (1 diff)
- sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/controllers/extent_transactions.py (modified) (2 diffs)
- sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/templates/extent_transactions/index.html (modified) (1 diff)
- sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/templates/extent_transactions/show.html (added)
- sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/tests/functional/test_extent_transactions.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/config/routing.py
r2926 r2935 22 22 23 23 map.resource('extent', 'extents', 24 path_prefix='/databases/:db_id') 24 path_prefix='/databases/:db_id', 25 ) 25 26 26 27 map.resource('query', 'queries', 27 28 controller='extent_queries', 28 29 path_prefix='/databases/:db_id/extents/:extent_id', 29 name_prefix='extent_') 30 name_prefix='extent_', 31 ) 30 32 31 33 map.resource('transaction', 'transactions', 32 34 controller='extent_transactions', 33 35 path_prefix='/databases/:db_id/extents/:extent_id', 34 name_prefix='extent_') 36 name_prefix='extent_', 37 member=dict(call='POST'), 38 ) 35 39 36 40 map.connect(':controller/:action/:id') sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/controllers/extent_transactions.py
r2931 r2935 15 15 c.extent = db.extent(extent_id) 16 16 return render_response('/extent_transactions/index.html') 17 18 def call(self, db_id, extent_id, id): 19 """POST /id;call: Call the transaction method.""" 20 # url_for('call_extent_transaction', id=ID) 21 pass 17 22 18 23 def create(self): … … 44 49 pass 45 50 46 def show(self, id, format='html'):51 def show(self, db_id, extent_id, id, format='html'): 47 52 """GET /id: Show a specific item.""" 48 53 # url_for('extent_transaction', id=ID) 49 pass 54 c.dbs = dbs = self.dbs 55 c.db_id = db_id 56 c.db = db = dbs[db_id] 57 c.extent = db.extent(extent_id) 58 c.method = c.extent.t[id] 59 c.method_id = id 60 return render_response('/extent_transactions/show.html') 50 61 51 62 def edit(self, id, format='html'): sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/templates/extent_transactions/index.html
r2931 r2935 32 32 % for name in c.extent.t: 33 33 <li> 34 <a href=" #">${h.label(c.extent.t[name])}</a>34 <a href="${h.url_for('extent_transaction', db_id=c.db_id, extent_id=c.extent.name, id=name)}">${h.label(c.extent.t[name])}</a> 35 35 </li> 36 36 % endfor sandbox/mscott/SchevoPylonsNav/trunk/schevopylonsnav/tests/functional/test_extent_transactions.py
r2931 r2935 8 8 url_for('extent_transactions', db_id='db', extent_id='Foo')) 9 9 assert 'Create' in response 10 11 def test_create(self): 12 response = self.app.get( 13 url_for('extent_transaction', db_id='db', extent_id='Foo', 14 id='create')) 15 assert 'Call' in response
