Hi !
After i upgrade few Pylons packages elements related with Pylons i
get "403 CSRF" error in function tests in my app. After look to form i
saw that when I use some default values to fill form and use
secure_form too _authentication_token is empty.
------------ controller -----------------
def index(self):
form = render('/information/index.mako')
info = None
try:
info = Informations.fetch(session['userdata']['uid'])
except ZhradminNoResults:
return form
return formencode.htmlfill.render(
form,
defaults = info
)
------------ controller -----------------
------------ template -----------------
${h.secure_form(h.url_for('/information/update'), method='post')}
${h.end_form()}
------------ template -----------------
------------ site source -----------------
<form action="/information/update" method="post">
<div style="display: none;"><input name="_authentication_token"
type="hidden" value="" /></div>
------------ site source -----------------
Is this a bug or it is normally and i should just do worakround and
get some random "string" in controller for info._authentication_token
by my own and do all this strange stuff for "@authenticate_form" ?
Greetings from Poland
--
Jan Koprowski
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---