> The Crud controller constructs a JSON data request that is (seemingly)
> generated from the lowercase name of the model plus an extra 's'.
> So the JSON request becomes categorys.json.
> I tried to guide the CrudRestController (as it works with the
> RestController) by specifying __url__, but that parameter was ignored
> by de CrudRestController.
> What 'fixed' it was defining the CrudRestController as:
>
> categorys = CategoryController()

CRC doesn't have a __url__ attribute.  Sprox's DojoTableBase does.  To
make your Category controller have sane URLs you might do something
like:

class CategoryController(CrudRestController):

    class table_type(DojoTableBase):
         __model__ = Category
         __url__ = './categories.json'

I have opened a new ticket to address this issue:
http://trac.turbogears.org/ticket/2353

I've been doing some work on tgext.crud lately while adding mongodb
support, so I will see if I can address this in the next release.

You are invited and also encouraged to open your own tickets when an
issue like this comes up.

cheers.
-chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to