Changeset 187:404f0bb46bc0
- Timestamp:
- 07/17/09 20:15:40 (14 months ago)
- Author:
- rgrp
- Branch:
- default
- convert_revision:
- svn:0ead1229-0713-0410-96cd-f668dbfad531/trunk@273
- Message:
-
[wui][s]: Provide CRUD admin interface for domain model (ticket:49) using formalchemy pylons extension.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r173
|
r187
|
|
| 18 | 18 | |
| 19 | 19 | install_requires=[ |
| 20 | | 'Pylons>=0.9.6.1', |
| | 20 | 'Pylons>=0.9.6.1,<0.9.6.99', |
| 21 | 21 | 'SQLAlchemy>=0.4,<0.4.99', |
| 22 | | 'Genshi>=0.3', |
| | 22 | 'Genshi>=0.4', |
| 23 | 23 | 'pygooglechart>=0.2,<0.3', |
| | 24 | 'FormAlchemy>=1.0', |
| 24 | 25 | # 'annotater>=0.1', |
| 25 | 26 | ], |
-
|
r161
|
r187
|
|
| 7 | 7 | from pylons import config |
| 8 | 8 | from routes import Mapper |
| | 9 | from formalchemy.ext.pylons import maps # routes generator |
| 9 | 10 | |
| 10 | 11 | def make_map(): |
| … |
… |
|
| 19 | 20 | # CUSTOM ROUTES HERE |
| 20 | 21 | |
| 21 | | |
| | 22 | # Map the /admin url to FA's AdminController |
| | 23 | maps.admin_map(map, controller='admin', url='/admin') |
| | 24 | # now main shakespeare routes |
| 22 | 25 | map.connect('', controller='site', action='index') |
| 23 | 26 | map.connect('marginalia/*url', controller='site', action='marginalia') |
| … |
… |
|
| 25 | 28 | map.connect(':controller/:action/:id') |
| 26 | 29 | map.connect(':action', controller='site') |
| | 30 | |
| 27 | 31 | map.connect('*url', controller='template', action='view') |
| 28 | 32 | |
-
|
r151
|
r187
|
|
| 10 | 10 | print res |
| 11 | 11 | assert "Home" in res |
| 12 | | assert 'Welcome to the Open Shakespeare web interface' in res |
| 13 | 12 | |
| 14 | 13 | def test_guide(self): |