kotti.views.login¶
Login / logout and forbidden views and forms.
-
class
kotti.views.login.
UserSelfRegistered
(object, request=None)[source]¶ This event is emitted just after user self registered. Intended use is to allow addons to do some preparation for such user - create custom contents, nodes etc. Event handler object parameter is a Principal object
-
kotti.views.login.
login
(context, request)[source]¶ Login view. Renders either the login or password forgot form templates or handles their form submission and redirects to came_from on success.
Result: Either a redirect response or a dictionary passed to the template for rendering Return type: pyramid.httpexceptions.HTTPFound or dict
-
kotti.views.login.
logout
(context, request)[source]¶ Logout view. Always redirects the user to where he came from.
Result: Redirect to came_from Return type: pyramid.httpexceptions.HTTPFound
-
class
kotti.views.login.
SetPasswordSchema
(*arg, **kw)[source]¶ Schema for the set password form
-
password
= None¶ colander.String
-
token
= None¶ colander.String
-
email
= None¶ colander.String
-
continue_to
= None¶ colander.String
-
-
kotti.views.login.
set_password
(context, request, success_msg=u'You have reset your password.')[source]¶ Set password view. Displays the set password form and handles its form submission.
Parameters: success_msg (str or TranslationString) – Message to display on successful submission handling Result: Redirect response or dictionary passed to the template for rendering. Return type: pyramid.httpexceptions.HTTPFound or dict
-
kotti.views.login.
forbidden_redirect
(context, request)[source]¶ Forbidden redirect view. Redirects to the login form for anonymous users or to the forbidden view for authenticated users.
Result: Redirect to one of the above. Return type: pyramid.httpexceptions.HTTPFound
-
kotti.views.login.
forbidden_view
(request)[source]¶ Forbidden view. Raises 403 for requests not originating from a web browser like device.
Result: 403 Return type: pyramid.httpexceptions.HTTPForbidden