flexmeasures.ui.crud.users

Functions

flexmeasures.ui.crud.users.get_users_by_account(account_id: int | str, include_inactive: bool = False) list[User]
flexmeasures.ui.crud.users.process_internal_api_response(user_data: dict, user_id: int | None = None, make_obj=False) User | dict

Turn data from the internal API into something we can use to further populate the UI. Either as a user object or a dict for form filling.

flexmeasures.ui.crud.users.render_user(user: User | None, asset_count: int = 0, msg: str | None = None)

Classes

class flexmeasures.ui.crud.users.UserCrudUI
get(id: str)

GET from /users/<id>

index()

/users

reset_password_for(id: str)

/users/reset_password_for/<id> Set the password to something random (in case of worries the password might be compromised) and send instructions on how to reset.

toggle_active(id: str)

Toggle activation status via /users/toggle_active/<id>

class flexmeasures.ui.crud.users.UserForm(*args, **kwargs)