Alright, new problem: It doesn't work in conjunction with form
validation. I believe I read somewhere that if you're using decorators
to validate along with the @authenticate_form, then the order matters.
In my case, I'm only using the @authenticate_form decorator and I'm
validating inside of the controller action because the decorator
wasn't flexible enough to give me the state information I needed:
# Taken from
http://wiki.pylonshq.com/display/pylonscookbook/Validation+without+the+validate+decorator
form = UserUpdateValidation()
if not
form.is_valid(state=State(current_user=self.current_user)):
return form.complain(self.edit())
Any thoughts on how to either 1.) get the @authenticate_form decorator
to play nice, or 2.) how to use it without the decorator?
Thanks.
On Aug 22, 8:59 pm, Ryan McKillen <[email protected]> wrote:
> Facepalm. Thanks!!
>
>
>
> On Sun, Aug 22, 2010 at 8:33 PM, cd34 <[email protected]> wrote:
> > The import should be in lib/helpers.py rather than your controller so
> > that it is exposed in your templates.
>
> > --
> > 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]<pylons-discuss%2bunsubscr...@go
> > oglegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/pylons-discuss?hl=en.
--
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.