pytwask.main package

Submodules

pytwask.main.views module

This module defines all the main views.

pytwask.main.views.bad_request(err)

This view handles the 400 error.

pytwask.main.views.forbidden(err)

This view handles the 403 error.

pytwask.main.views.index()

This view renders the main index page.

Since the main index page has the login form, so it is redirected to the auth Blueprint right away.

pytwask.main.views.load_user(session_token)

This function is required by flask_login to get the ‘User’ instance from the session token.

Parameters:session_token (str) –
Returns:
  • A ‘User’ instance if the session token is valid;
  • None otherwise.
pytwask.main.views.page_not_found(err)

This view handles the 404 error.

pytwask.main.views.server_error(err)

This view handles the 500 error.

Module contents

The blueprint which contains all the main views.