-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

thanks, iain.

nice examples.

alex

iain duncan wrote:
> 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
> 
> 
> 
> 
> > 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBR3RJxtpwN1sq38njAQKs2gP5AQkrF3E6ThpFbj9nHmL+azDEn3nfQBd4
Vh8Z+qzE6LVEtTOfC98Y8BGJn6x797DlbFs+npEQagsRCKQlWtqRS+dRRkyKdYb1
LvxGSSzN8G6BoHw5lflZ+GyjJ0h0oKF6oRsMXvJaOwX25EFpYCrQgd9PhFfJMpgg
/kgAE2z41HQ=
=41iJ
-----END PGP SIGNATURE-----

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