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 #2358 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

override_template does not work if @without_trailing_slash placed before @expose)

Reported by: sbeilin Owned by: rick446
Priority: normal Milestone: 2.1b2
Component: TurboGears Version: 2.0.1
Severity: minor Keywords:
Cc:

Description (last modified by jorge.vargas) (diff)

override_template does not work (just does not change the template) if @without_trailing_slash is placed before @expose. If @expose() is placed first and @without_trailing_slash after it, it works as expected.

Stepped in with TG2 2.0.1 and 2.0.3.

Maybe also happens with other decorators -- not tested.

Change History

comment:1 Changed 8 years ago by sbeilin

Oops! must read as:

override_template does not work if @without_trailing_slash placed *before* @expose)

comment:2 Changed 8 years ago by chrisz

There was a similar problem with @paginate and @validate (#2303) that has been solved in TG 2.1 by implementing @paginate using the Decoration class in tg.decorators. This allows you to control exactly where the decator is hooked in. Maybe we need to do the same with @without_trailing_slash, @with_trailing_slash and @postpone_commits.

comment:3 Changed 8 years ago by jorge.vargas

  • Owner set to percious
  • Milestone set to 2.1
  • Description modified (diff)
  • Summary changed from override_template does not work if @without_trailing_slash placed after @expose to override_template does not work if @without_trailing_slash placed before @expose)

+1 on chrisz's point. All our decorators should be order agnostic

comment:4 Changed 8 years ago by percious

  • Milestone changed from 2.1 to 2.1b2

comment:5 Changed 8 years ago by percious

  • Owner percious deleted

I'm un-assigning myself this ticket cause I think it's dumb. I mean seriously. this decorator constitutes about 4 lines of code and you want to hang more crap of decorated controller. If someone wants to do this I am all for it, just don't want to spend any time on it myself, sorry 'bout that.

comment:6 Changed 8 years ago by rick446

  • Status changed from new to assigned
  • Owner set to rick446

comment:7 Changed 8 years ago by rick446

  • Status changed from assigned to closed
  • Resolution set to fixed

Resolved in c32b519da4d3

Note: See TracTickets for help on using tickets.