On Mon, Jul 12, 2010 at 1:22 AM, Gisborne <[email protected]> wrote:
> TurboGears 2.1. I did:
>
> $paster restcontroller thing things
>
> Then in my routing.py, I have:
>
> map = Mapper(…
> map.minimization=False
>
> map.resource('thing', 'things')
>
> Then I have a controllers/things.py, which has this:
>
> …
> class ThingsController(self, format='html')
> …
>
> and so on, all just generated by paster.

A controller can't be defined that way. I assume you mean

class ThingsController(...):
    def index(self, format="html"):
        ....

> I fire this up, go to /things, and I get a 404 error.
>
> Okay, so:
>
> - 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.

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.

-- 
Mike Orr <[email protected]>

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