i couldn't find the answer to this in the wiki or the group
example:
@validate(form=registration__form)
@error_handler(registration)
@expose(template="templates.registration__success")
def registration_save(self, **data):
return dict(
user_email = data['email']
)
should the form be validated, i'm not going to go into a direct
'success' . my flow is really this:
validate form
process form - lookup email. if its registered, push to a different
controller / function ( registration__failure__exists )
process form - attempt to register email. if it fails, push to a
different controller / function ( registration__failure__sql )
process form - attempt to send verification email. if it fails,
push to a different controller / function ( registration__failure__sql
)
actual sucess - either push the template as-is , or possibly better
, this controller has no template and we redirect to a
registration__success controller instead
does anyone have a suggestion on how to do this, or a better approach?
the only thing i could find similar was a reference to the identity
framework.
in it, we have this line based on a failure url
cherrypy.InternalRedirect.__init__(self, url)
i think, however , that
a) there has got to be some sort of TG abstraction of this, so I'm
not using cherrypy directly ( i have no issue with that, other than i'd
like to stay within TG if possible )
b) there must be some way to do this without having an exposed url (
ie: i don't want register_fail to be accessible, just be a function
called from register_save )
c) there is a more TG-esque way of this than I am thinking of
I've been combing through Fasttrack and Docudo looking for potential
implemtnations, but no luck. the only thing i've found is
turbogears.redirect() which seems to be an external redirect
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---