Hi,
I using the crudrestcontroller with sprox, following the movie
example, you got a MovieController,
class MovieController(RestController)
In the root controller you put something like this:
class RootController(BaseController):
movies = MovieController(DBSession)
The you got access to http://myserver/movies/ to see de list of movies
and to http://myserver/movies/1/edit to edit movie with id = 1,
http://myserver/movies/new to create a new movie etc.
Following the doc in http://microformats.org/wiki/rest/urls with
something like this http://myserver/movies/1/directors/ you should got
access to the directors of movie with the id=1
I got a DirectorsController(RestController) but I don't know how to
"connect" this class to MovieController.
When a user access http://myserver/movies/1/directors/ the funtion
get_one in the MovieController handles the request but I don't know
how to pass the request to DirectorsController. I can manually parse
the args and call get_all, get_one, new etc of the
DirectorsControllers but I don't think that is the best way.
If a do:
class MovieController(RestController)
directors = DirectorsController(DBSession)
The controllers repond to http://myserver/movies/directors but not to
http://myserver/movies/1/directors ....
I have downloaded movidemo example but does not work correctly.
Any idea?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---