Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2066 (closed defect: fixed)

Opened 11 years ago

Last modified 10 years ago

Routes Does not work with DecoratedController and __before__

Reported by: percious Owned by: percious
Priority: high Milestone: 2.0b5
Component: TurboGears Version: trunk
Severity: major Keywords:
Cc:

Description (last modified by percious) (diff)

If you make a decorated controler ala:

class MyController(DecoratedController):
    def __before__(self):
       print 'never gets here'

    def index(self):
       return ''

and make a route like:

map.connect('my_index', 'my', controller='my')

An error occurs, complaining that before does not have a decorated attribute.

Change History

comment:1 Changed 11 years ago by percious

  • Description modified (diff)

comment:2 Changed 11 years ago by mramm

  • Priority changed from normal to low

comment:3 Changed 11 years ago by mramm

  • Milestone changed from 2.0b1 to 2.0b2

comment:4 Changed 11 years ago by mramm

  • Owner changed from faide to percious

comment:5 Changed 11 years ago by mramm

  • Milestone changed from 2.0b2 to 2.0b3

comment:6 Changed 11 years ago by percious

  • Status changed from new to assigned

Mark, if you add a test framework for routes it would help me get this thing squashed.

comment:7 Changed 10 years ago by percious

  • Priority changed from low to high

comment:8 follow-up: ↓ 9 Changed 10 years ago by percious

This actually affects all controllers, since everything inherits from Decorated. This is functionality that should have been carried over from WSGIController, but was dropped.

comment:9 in reply to: ↑ 8 Changed 10 years ago by percious

Replying to percious:

This actually affects all controllers, since everything inherits from Decorated. This is functionality that should have been carried over from WSGIController, but was dropped.

This actually works fine with regular dispatch. Not sure why it doesn't work with routes.

comment:10 Changed 10 years ago by percious

I take it back, the test I wrote was in error.

comment:11 Changed 10 years ago by percious

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.