This is not the case, but I also misinterpreted something.
The real problem is, that when I execute an action that redirects to a
page, like this:
@expose()
@require(not_anonymous())
def updateProfile(self, **kw):
try:
userOperations.updateUserData(**kw)
msg={'main':'Update was successful.'}
except Exception, ex:
msg =ex.args[0]
redirect(url('/myprofile/profile', messages = msg))
i get an HTTP GET. the msg dictionary is sent as a string, causing
unexpected behavior.
How can I redirect with post? Or if it is impossible, what is an
adequate solution to this problem?
david
On Aug 10, 9:27 am, Tamas Hegedus <[email protected]> wrote:
> Hi,
>
> I think that something is not clear or clean :-)
>
> The variable in the link is present not because of the "return
> dict(...)", but because of the submitted form in the previous page,
> which directs to renewpassword_1... The form in the previous page most
> likely have the action="renewpassword_1" and no method="POST" is set.
>
> Tamas
>
>
>
>
>
>
>
>
>
> David Borsodi wrote:
> > Hello
>
> > I'd like to ask that how can I send the data given in an exposed
> > controller method as a 'post'.
> > E.g. if I have this:
> > @expose('mutdb.templates.renewpassword_1')
> > def renewpassword_1(self, **kw):
> > return dict(page='rewnewpassword_1', state=kw.get('state',
> > 'pre'))
>
> > I get the following url after execution, what looks like an HTTP GET:
> >http://localhost:8080/renewpassword_1?state=pre
> > which is sometimes unacceptable (eg in case of returning an sql
> > resultset) and usually not elegant.
>
> > So, is there any way to post the dictionary ?
>
> > thanks
> > david
>
> --
> Tamas Hegedus, PhD
> Membrane Research Group | phone: (36) 1-459 1500/60233
> Hungarian Academy of Sciences | fax: (36) 1-266 6656
> Tuzolto utca 37-47 | mailto:[email protected]
> Budapest, 1094, Hungary |http://www.hegelab.org
--
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.