magpie.ui.user.views

Module Contents

Classes

UserViews

Base methods for Magpie UI pages.

Attributes

LOGGER

magpie.ui.user.views.LOGGER[source]
class magpie.ui.user.views.UserViews(request)[source]

Bases: magpie.ui.utils.BaseViews

Base methods for Magpie UI pages.

add_template_data(data=None)[source]

Adds required template data for the ‘heading’ mako template applied to every UI page.

get_current_user_groups(user_group_status: magpie.models.UserGroupStatus = UserGroupStatus.ACTIVE) magpie.typedefs.List[str][source]
get_current_user_info() magpie.typedefs.JSON[source]
get_discoverable_groups() magpie.typedefs.List[str][source]
join_discoverable_group(group_name)[source]

Registers the current user to the discoverable group.

Raises:

HTTPBadRequest – if the operation is not valid.

leave_discoverable_group(group_name: magpie.typedefs.Str) None[source]

Unregisters the current user from the discoverable group.

Raises:

HTTPBadRequest – if the operation is not valid.

edit_current_user()[source]

Edit the own fields of the current user profile (self-update information).

See also