On Jul 12, 2010, at 21:58 , Mike Orr wrote:
>> So here is my routes file:
>>
>> <http://pylonshq.com/pasties/cd546ef11d0d3a436cece0d16e2e72a5>
>>
>> When I try to hit /incidents, it goes through the authentication stuff, then
>> decides that the right controller is root, which naturally fails. This then
>> produces a simple 404 error in the browser (no fancy backtrace debugger —
>> which is very cool, but I don't think it would help much here, even if I
>> could get it to display).
>
> First, make sure it's working with other URLs. Does "/admin" work?
> Then, create a route and action containing only "raise RuntimeError".
> That should bring up the interactive traceback, to make sure it works.
/error/... works. /admin works. /activate doesn't. It used to, and there is a
activate method on root with a @expose above it.
> "Not Found" can mean several things: no route matched, controller
> missing, action missing. In the latter two cases, I'd expect the
> interactive traceback when in debug mode though.
What is confusing to me is that it's just displaying a 404 rather than going to
the backtrace debugger wossname.
But mostly that it's not picking up the route. The documentation about restful
routes is fairly minimal: put route.resource(single-name, plural-name) with
some options and it just works. Only it doesn't, and I can't find anything
about what might do that.
In Rails, I could fire up a Ruby shell that loads up all the framework classes,
and I could interrogate the routing class about what it thinks is going on. Is
there some equivalent for Pylons?
> Lines 16 and 20 overlap: a resource route "/incidents" and a regular
> route "/incidents". It should match the first one. It's surprising
> it's not matching either one. That suggests something strange is
> happening, like maybe this route map isn't even being used. Have you
> asked on the TurboGears list? They may be better at diagnosing it. I
> haven't used recent versions of TurboGears.
That was just me experimenting. Commenting it out doesn't help.
> You could try commenting out line 18 ("/evidences"). It's probably not
> the problem, but it's the most unusual route..
Commenting that out doesn't help, and I note that routes further down in the
file are working.
I think what I really need is some way to pull up the routing infrastructure in
a python shell so I can see what it thinks is going on.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.