On Thu, 2007-27-12 at 11:45 +0200, alex bodnaru wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > iain, is the rtfm because i mentioned the name rest?
Wasn't meant to be an rtfm but rather a look-here-for-additional-resources-i-found-useful on restful dispatching! ;-) > >> as i think of it more, my problem was to put in a widget, the entire > >> status of a controller, like forms in the case of a crud controller. > >> > >> that is inefficient indeed, hence i need an uri way to access this info, > >> thus to keep it in a server wide dictionary. > >> > >> then, i could access state and data at > >> tg.url(/model_crud/table_name/edit?id=999), or restless, > >> tg.url(/model_crud/edit?table=table_name&id=999). This part however I have found easier to maintain by doing restful urls. I set mine up so I could do /model_crud/1/edit or model_crud/edit/1 or model_crud/new, etc. Here is the dispatcher I came up with for TG 1 in my crudcontroller, I've no doubt it could be more elegant, but it allows for very flexible url handling. ( There's some cruft in there right now too but it should give you something to go on. ) http://www.xornot.com/tg_examples I plan to go over that thing in the new year to redo it properly for TG2 and hopefully incorporate Chris's dbsprocket work if that seems feasible HTH, Iain --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

