everything works fine if i am updating the display name but when i
update the username or the email address nothing happen. The except
section doesnt kick in. The page is just redirected to /settings
What have i misses. I am using the quick start authentication method.
> The redirect in the except is no happening its one else where that is
> used if the update has occured.
So you're seeing the flash message "User updated" and you have added the DBSession.flush()? It should work then. Check if you're really picking the right juser object with old_username. You can always add print, log and assert statements, or add them to the flash message, to make such things sure, or even use a debugger. If you still have problems, you will need to paste your complete example.
but i am getting the error NameError: name 'validate' is not defined
and i am importing like from formencode import validators. So i can
tell if i am doing this right. Any help?
On Nov 20, 2:17 pm, Christoph Zwerschke <c...@online.de> wrote:
> > The redirect in the except is no happening its one else where that is
> > used if the update has occured.
> So you're seeing the flash message "User updated" and you have added the
> DBSession.flush()? It should work then. Check if you're really picking
> the right juser object with old_username. You can always add print, log
> and assert statements, or add them to the flash message, to make such
> things sure, or even use a debugger. If you still have problems, you
> will need to paste your complete example.
> but i am getting the error NameError: name 'validate' is not defined
> and i am importing like from formencode import validators. So i can
> tell if i am doing this right. Any help?
Diez B. Roggisch wrote:
> adam wrote:
>> ok i am trying to add in the validation but i am a little confused as
>> i am not using form widgets. So i am trying something like
>> but i am getting the error NameError: name 'validate' is not defined
>> and i am importing like from formencode import validators. So i can
>> tell if i am doing this right. Any help?
> from tg import validate
> Should be in a quickstarted project.
Also, you're using kw in the decorator where it's not defined. Just put
'group' there. You can also use a Form/Schema.