Hi,

The following is an excerpt from the docstring of notebook() about how
to add a new user:

accounts – boolean (default: False) if True, any visitor to the
website will be able to create a new account. If False, only the admin
can create accounts (currently, this can only be done by running with
accounts=True and shutting down the server properly (SIG_INT or
SIG_TERM), or on the command line with, e.g.,

from sagenb.notebook.notebook import load_notebook
nb = load_notebook(dir)
nb.set_accounts(True)
nb.add_user("username", "password", "em...@place", "user")
nb.save()


Trying to follow the explanation, I spent some time just to fail. Now
having succeeded to add a user, I think the documentation is obscure.
How about the following or something better?

... If False, only the admin can create accounts. Currently to add an
account, shut down the server properly and type on the command line,
e.g.,

sage: from sagenb.notebook.notebook import load_notebook
sage: nb = load_notebook(dir)
sage: nb.set_accounts(True)
sage: nb.add_user("username", "password", "em...@place", "user")
sage: nb.save()

where dir is the directory of the sage notebook with default being
`.sage/sage_notebook.sagenb', and restart the server.


Kwankyu

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to