On Jul 12, 2010, at 9:17 , Graham Higgins wrote:

> But this is Pylons, so not only do you have a detailed log, it is also an 
> interactive debugger, allowing you to directly interrogate the app state:
> 
> http://pylonshq.com/docs/en/1.0/debugging/

Thanks for the advice, but I'm still confused.

The docs advise me to do this in my config/middleware.py:

if asbool(full_stack):    
        # Handle Python exceptions
        app = ErrorHandler(app, global_conf, **config['pylons.errorware'])
        # Display error documents for 401, 403, 404 status codes (and
        # 500 when debug is disabled)
        if asbool(config['debug']):
                app = StatusCodeRedirect(app)
                else:
                app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])



I currently have this in my config/middleware.py:

    app = make_middleware_with_config(
        app,
        global_conf,
        who_config,
        app_conf['who.log_file'],
        app_conf['who.log_level'],
        skip_authentication=asbool(app_conf.get('skip_authentication', 'false'))
    )


Do I append the if asbool… stuff? Somehow merge it with what I've got?

On Jul 12, 2010, at 11:28 , Mike Orr wrote:

>> - can anyone tell me from here what I've done wrong?
>> - (more importantly) how do I get more information than just "404"?
>> I've got all my logging set to debug in my config file. If this was
>> Rails, I'd have a detailed log being produced that tells me what
>> controller it was going to, what arguments it received, and so on. All
>> my log in TG is giving me is the SQL being generated. What am I
>> missing?
> 
> This is a TurboGears application with a REST controller? I'm afraid
> you're asking too many questions at once, plus I'm not sure exactly
> what you're seeing or whether the other parts of the application work.
> If there's any SQL activity, you wouldn't get a 404 because it would
> be past that point.

And yet that's what I'm seeing.

It's ignoring the map.resource and falling through to my "root" controller. 
It's after that, that I get the 404. But it does a bunch of auth-related SQL 
first.

> Please try creating a default Pylons application with a REST
> controller, and if you get a 404 then, we can address your questions
> one by one.

I'm not sure what that would get us. This is an app someone else started that 
I'm picking up. Whether or not I had trouble with my restful route in a new 
project, it wouldn't tell me why it's failing in this one.

FWIW, the restful route call is the first one in the routing file.

-- 
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.

Reply via email to