websauna.system.devop.scripts.createuser module

ws-create-user script.

Create a new site user from command line.

websauna.system.devop.scripts.createuser.create(request, username, email, password=None, source='command_line', admin=False)[source]

Create a new site user from command line.

Parameters
  • request

  • username (str) – Username, usually an email.

  • email (str) – User’s email.

  • password (Optional[str]) – Password.

  • source (str) – Source of this user, in here, command_line.

  • admin (bool) – Set this user to admin. The first user is always implicitly admin.

Return type

InterfaceClass

Returns

Newly created user.

websauna.system.devop.scripts.createuser.main(argv=['/Users/moo/code/websauna/websauna/venv/bin/sphinx-build', '-b', 'html', '-d', 'build/doctrees', 'source', 'build/html'])[source]

Create a new site user from command line.

Parameters

argv (List[str]) – Command line arguments, second one needs to be the uri to a configuration file.

Raises

sys.SystemExit

websauna.system.devop.scripts.createuser.usage_message(argv)[source]

Display usage message and exit.

Parameters

argv (List[str]) – Command line arguments.

Raises

sys.SystemExit