~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/traversal.py

  • Committer: William Grant
  • Date: 2009-07-05 03:49:31 UTC
  • mto: (1294.4.2 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20090705034931-e41r97axkoxeitw6
Move i.w.tutorial traversal stuff into i.w.tutorial.traversal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
17
 
18
 
from storm.locals import Store
19
 
 
20
18
from ivle.database import Offering, ProjectSet, Project, Subject, User
21
19
 
22
20
from ivle.webapp import ApplicationRoot
23
 
from ivle.webapp.publisher import ROOT
24
 
from ivle.webapp.publisher.decorators import forward_route, reverse_route
 
21
from ivle.webapp.routing import ROOT
 
22
from ivle.webapp.routing.decorators import forward_route, reverse_route
25
23
 
26
24
@forward_route(ApplicationRoot, argc=1)
27
25
def root_to_user(root, segment):
50
48
 
51
49
@reverse_route(User)
52
50
def user_url(user):
53
 
    return (ROOT, '~' + user.login)
 
51
    return (ROOT, '~' + user)
54
52
 
55
53
@reverse_route(Subject)
56
54
def subject_url(subject):
57
 
    return (ROOT, ('subjects', subject.short_name))
 
55
    return (ROOT, ('subjects', subject.name))
58
56
 
59
57
@reverse_route(Offering)
60
58
def offering_url(offering):