Bug 723358 - TurboGears does not deal with parameters to index() methods
Summary: TurboGears does not deal with parameters to index() methods
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: TurboGears2
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Luke Macken
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-19 22:52 UTC by Toshio Ernie Kuratomi
Modified: 2016-09-20 02:42 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-16 14:03:29 UTC
Type: ---


Attachments (Terms of Use)

Description Toshio Ernie Kuratomi 2011-07-19 22:52:17 UTC
Description of problem:
Trying to port a TG1 app to TG2 we found that a method like this:

def index(self, param):
   return {}

Does not work.  If you attempt to hit the URL without an extra path parameter, you get an error about index() needing another param.  If you hit the URL with an extra path parameter, you get a 404 not found.

Version-Release number of selected component (if applicable):
TurboGears2-2.1-0.3.rc1.dev1048.fc14.noarch

How reproducible:
Everytime

Steps to Reproduce:
1. paster quickstart tester
2. Accept defaults
3. cd tester
4. vim tester/controllers/root.py
5. Modify the def index(self):
   To be: def index(self, parameter):
6. paster serve development.ini
7. wget -SO/dev/null http://localhost:8080/abc
  
Actual results:

Response code 404

Expected results:

Response code 200; browsing to the URL would show the index page

Additional info:

Comment 1 Toshio Ernie Kuratomi 2011-07-20 00:29:39 UTC
Also occurs with Fedora 15; TG-2.1 final.  This could be an undocumented behaviour change.  If so, the 20 minute wiki tutorial on upstream's website needs fixing as well.

Comment 2 Toshio Ernie Kuratomi 2011-07-20 00:30:21 UTC
Workaround for now is to change

def index(self, parameters):

to

def default(self, parameters):

Comment 3 Fedora End Of Life 2012-08-16 14:03:32 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.