On Feb 5, 11:52 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> In my case, I have a
> CRUD application where I can filter the records listing by various
> fields which might or might not be present in the URL. Let's assume I
> can map these in a RESTful way but one would like to edit a record.
> The REST URL (i.e. /some/resource/55/edit) passed for editing would
> miss the previous pagination information and, after saving the record,
> you get back to the beginning of the list with the filtering and page
> number information lost. [..]
> Of course, you can save the page number and filtering information in a
> session but I don't think we need the full power of sessions here,
> when there is no private information.

I think a session would be the simplest solution here.
If you save the page in the session, you can easily direct the user to
the proper resource/page after edit:

@expose()
def doedit(self, stuff):
    "save stuff"
    raise redirect("/some/resource/page/", session['page'])

I can hardly imagine how it could be easier using some generic state
framework.
--~--~---------~--~----~------------~-------~--~----~
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