Sage Trac Server¶
This module configures and launches a Trac server, if an optional package (e.g., trac-x.y.z.spkg) is installed.
-
sage.server.trac.trac.
trac
(directory='sage_trac', port=10000, address='localhost', open_viewer=False, auto_reload=False, easy_setup=False, options='')¶ Start a Trac server, creating a new project, if necessary. An “optional” Sage package trac-x.y.z.spkg must already be installed. (Use optional_packages() to get the exact name.)
INPUT:
directory
- a string (default: ‘sage_trac’); name of the project directoryport
- an integer (default: 10000); the server’s port numberaddress
- a string (default: ‘localhost’); the server’s addressopen_viewer
- a bool (default: False); whether to open a browser at the server’s addressauto_reload
- a bool (default: False); whether the server should restart automatically when its sources are modifiedeasy_setup
- a bool (default: False); if creating a new project, whether to enable optional plug-ins. Seetrac_create_instance()
.options
- a string (default: ‘’); command-line options to pass directly to tracd
-
sage.server.trac.trac.
trac_create_instance
(directory='sage_trac', easy_setup=False)¶ Create a new Trac project instance if Trac is installed.
INPUT:
directory
- a string (default: ‘sage_trac’); the name of the project directoryeasy_setup
- a bool (default: False); whether to use the project name ‘Sage’, the default database, enable the webadmin plugin, and enable the source browser for the ‘sage’ Mercurial repository.
Note
To access the webadmin panel, first create a user, give that user admin permissions, and log in as that user. Create new accounts using htdigest (part of Apache):
cd <directory>/conf htdigest passwd <server_address> <username>
Grant a user administrative privileges with:
trac-admin <directory> add <username> TRAC_ADMIN