I'm currently using @authenticate_form and @validate as decorators of
a method and it is failing when the @validate fills a form with
errors.
The code:
@authenticate_form
@validate(schema=AlbumForm(), form='form', post_only=False, on_get=True)
def post(self):
bla bla bla
If the first post fails because of the validators, the second one
fails because of secure_form.
The log:
19:56:01,710 DEBUG [meduermo.lib.base] [worker 8] /category/form
19:56:07,223 DEBUG [meduermo.lib.base] [worker 9] /category/post
19:56:12,416 DEBUG [meduermo.lib.base] [worker 0] /category/post
19:56:12,432 WARNI [pylons.decorators.secure] [worker 0] Cross-site
request forgery detected, request denied: <Request at 0x9ce406c POST
http://localhost:5000/category/post> REMOTE_ADDR: 127.0.0.1
form is the method that shows up the form (using secure_form.
post is the method that process the form data.
I don't know what I'm doing wrong with this. @authenticate_form and
@validate can work together?
Thanks,
Martin
--
Atte.
MartÃn Marrese
--
Home: http://www.kyheo.com.ar
GTalk: marrese at gmail.com
--
The Brain: Pinky, are you pondering what I'm pondering?
Pinky: I think so Brain, but if you replace the P with an O, my name
would be Oinky, wouldn't it?
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en.