| Trees | Indices | Help |
|
|---|
object --+ | core.Component --+ | object --+ | | | core.ComponentManager --+ | Environment
Trac environment manager. Trac stores project information in a Trac environment. It consists of a directory structure containing among other things: * a configuration file * an SQLite database (stores tickets, wiki pages...) * project-specific templates and plugins * wiki and ticket attachments
Inherited from core.Component :
__metaclass__
[])(name, version) tuples describing the name and
version information of external packages used by Trac and plugins.
source code
Inherited from core.ComponentManager:
__contains__,
__getitem__,
disable_component,
is_enabled
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
Inherited from core.Component :
__new__ ,
implements
<Option [trac] "base_url">
<BoolOption [trac] "use_base_url_for_r...
<Option [logging] "log_file">
<Option [logging] "log_format">
<Option [logging] "log_level">
<Option [logging] "log_type">
<Option [project] "admin">
<Option [project] "admin_trac_url">
<Option [project] "descr">
<Option [project] "footer">
<Option [project] "icon">
<Option [project] "name">
<Option [project] "url">
True
<BoolOption [trac] "secure_cookies">
<PathOption [inherit] "plugins_dir">
Inherited from object:
__class__
[])
Initialize the Trac environment. @param path: the absolute path to the Trac environment @param create: if `True`, the environment is created and populated with default data; otherwise, the environment is expected to already exist. @param options: A list of `(section, name, value)` tuples that define configuration options
Create a backup of the database.
Initialize additional member variables for components.
Every component activated through the Environment object gets three member variables: env (the environment object), config (the environment configuration) and log (a logger object).
[])
Create the basic directory structure of the environment, initialize the database and populate the configuration file with default values.
If options contains ('inherit', 'file'), default values will not be loaded; they are expected to be provided by that file or other options.
Return a database connection from the connection pool (deprecated)
Use with_transaction for obtaining a writable database connection and get_read_db for anything else.
Generator that yields information about all known users, i.e. users that have logged in to this Trac environment and possibly set their name and email.
This function generates one tuple for every user, of the form (username, name, email) ordered alpha-numerically by username.
Return a database connection for read purposes.
See trac.db.api.get_read_db for detailed documentation.
Return the version control repository with the given name, or the default repository if `None`. The standard way of retrieving repositories is to use the methods of `RepositoryManager`. This method is retained here for backward compatibility. @param reponame: the name of the repository @param authname: the user name for authorization (not used anymore, left here for compatibility with 0.11)
Return the current version of the database.
If the optional argument initial is set to True, the version
of the database used at the time of creation will be returned.
In practice, for database created before 0.11, this will return False
which is "older" than any db version number.
Implemented to only allow activation of components that are not disabled in the configuration.
This is called by the ComponentManager base class when a component is
about to be activated. If this method returns False, the component
does not get activated. If it returns None, the component only gets
activated if it is located in the plugins directory of the
enironment.
Upgrade database.
@param backup: whether or not to backup before upgrading @param backup_dest: name of the backup file @return: whether the upgrade was performed
Decorator for transaction functions.
See trac.db.api.with_transaction for detailed documentation.
<BoolOption [trac] "use_base_url_for_redirect">
| Trees | Indices | Help |
|
|---|