- Timestamp:
- Jul 5, 2019, 11:15:03 AM (19 months ago)
- Location:
- wiki/pages
- Files:
-
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
wiki/pages/CamelCase
r43268 r43921 1 1 = !CamelCase 2 2 3 New wiki links are automatically created when concatenating capitalized words, such that for example the word 'Camel' and the word 'Case' concatenated form a link to this CamelCase page. 3 4 4 !CamelCase is the original wiki convention for creating hyperlinks, with the additional requirement that the capitals are followed by a lower-case letter; hence “AlabamA” and “ABc”will not be links.5 !CamelCase is the original wiki convention for creating hyperlinks, with the additional requirement that the capitals are followed by a lower-case letter; hence "AlabamA" and "ABc" will not be links. 5 6 6 7 == Customizing the Wiki behavior 7 8 8 9 While Trac remains faithful to the original Wiki style, it provides a number of ways to accommodate users with different preferences: 9 * To prevent the creation of a new link of a camel-cased word, prefix with '!': `!CamelCase`.10 * To ignore links to missing pages when the link is written using the CamelCase style, that word can instead be replaced by a gray link followed by a question mark. This is useful in cases when CamelCase style is used to name code art ifacts like class names and there's no corresponding page for them. This option can be set in `ignore_missing_pages` in the [wiki:TracIni#wiki-section "[wiki]"] section of TracIni.11 * T here's an option (`split_page_names` in the [wiki:TracIni#wiki-section "[wiki]"] section of TracIni) to automatically insert space characters between the words of a CamelCase link when rendering the link.10 * To prevent the creation of a new link of a camel-cased word, prefix with an exclamation mark (`!`): `!CamelCase`. 11 * To ignore links to missing pages when the link is written using the CamelCase style, that word can instead be replaced by a gray link followed by a question mark. This is useful in cases when CamelCase style is used to name code artefacts like class names and there is no corresponding page for them. This option can be set in `ignore_missing_pages` in the [wiki:TracIni#wiki-section "[wiki]"] section of TracIni. 12 * To automatically insert space characters between the words of a CamelCase link when rendering the link, use `split_page_names` in the [wiki:TracIni#wiki-section "[wiki]"] section of TracIni. 12 13 * Creation of explicit Wiki links is also easy, see WikiPageNames for details. 13 14 * Wiki formatting can be disabled completely in some places, for example when rendering commit log messages. See `wiki_format_messages` in the [wiki:TracIni#changeset-section "[changeset]"] section of TracIni. -
wiki/pages/InterMapTxt
r38413 r43921 39 39 40 40 {{{ 41 PEP http://www.python.org/peps/pep-$1.html # Python Enhancement Proposal 41 PEP http://www.python.org/dev/peps/pep-$1/ # Python Enhancement Proposal 42 PythonBug http://bugs.python.org/issue$1 # Python Issue #$1 43 Python-issue http://bugs.python.org/issue$1 # Python Issue #$1 44 PythonWiki https://wiki.python.org/moin/ # Python Wiki 45 46 42 47 Trac-ML http://thread.gmane.org/gmane.comp.version-control.subversion.trac.general/ # Message $1 in Trac Mailing List 43 48 trac-dev http://thread.gmane.org/gmane.comp.version-control.subversion.trac.devel/ # Message $1 in Trac Development Mailing List 44 49 50 apidoc http://www.edgewall.org/docs/trac-trunk/html/$1.html # $1 in the API documentation for Trac 51 apiref http://www.edgewall.org/docs/trac-trunk/epydoc/$1.html # $1 in the Epydoc API reference for Trac 52 53 bitten http://bitten.edgewall.org/intertrac/ # Bitten's Trac 54 45 55 Mercurial http://www.selenic.com/mercurial/wiki/index.cgi/ # the wiki for the Mercurial distributed SCM 46 RFC http://rfc.net/rfc$1.html # IETF's RFC $1 56 hg http://www.selenic.com/hg/rev/$1?rev=$2 # Changeset $1 $2 in Mercurial repository 57 hg-issue http://mercurial.selenic.com/bts/issue # Issue $1 in Mercurial BTS 58 59 RFC http://tools.ietf.org/html/rfc$1 # IETF's RFC $1 60 ISO http://en.wikipedia.org/wiki/ISO_ # ISO Standard $1 in Wikipedia 61 kb http://support.microsoft.com/kb/$1/en-us/ # Article $1 in Microsoft's Knowledge Base 62 63 pypi http://pypi.python.org/pypi/ # $1 package in the Python Package Index 64 CheeseShop http://pypi.python.org/pypi/ # $1 package in the Python Package Index 65 peak http://peak.telecommunity.com/DevCenter/ # $1 in Python Enterprise Application Kit's Wiki 66 setuptools-issue http://bugs.python.org/setuptools/issue # issue$1 in legacy Setuptools tracker 67 pypa-setuptools-issue https://bitbucket.org/pypa/setuptools/issue/ # issue #$1 in BitBucket Setuptools tracker 68 69 SQLite http://www.sqlite.org/cvstrac/wiki?p=$1 # $1 page in the CvsTrac for SQLite 70 SQLiteTkt http://www.sqlite.org/cvstrac/tktview?tn=$1 # Ticket $1 in the CvsTrac for SQLite 71 72 mysql-bugs http://bugs.mysql.com/bug.php?id= # Bug #$1 in MySQL's bug database 73 mysql-issue http://bugs.mysql.com/bug.php?id= # Bug #$1 in MySQL's bug database 74 75 MODPYTHON http://issues.apache.org/jira/browse/MODPYTHON- # Issue $1 in mod_python's JIRA instance 76 mod-python-issue http://issues.apache.org/jira/browse/MODPYTHON- # Issue $1 in mod_python's JIRA instance 77 78 SvnWiki http://www.orcaware.com/svn/wiki/ # Subversion Wiki 79 svnissue http://subversion.tigris.org/issues/show_bug.cgi?id= # Subversion issue #$1 80 svn-issue http://subversion.tigris.org/issues/show_bug.cgi?id= # Subversion issue #$1 81 svncset http://svn.collab.net/viewvc/svn?view=revision&revision= # Subversion [$1] 82 83 mod-wsgi http://code.google.com/p/modwsgi/wiki/ # mod_wsgi Wiki on Google Code 84 mod-wsgi-issue http://code.google.com/p/modwsgi/issues/detail?id= # mod_wsgi Issue Tracker on Google Code 85 86 chromium-issue http://code.google.com/p/chromium/issues/detail?id= 87 88 Django http://code.djangoproject.com/intertrac/ # Django's Trac 89 AgileTrac http://www.agile-trac.org/intertrac/ # Plugin adding Iterations to Trac 90 91 CreoleWiki http://wikicreole.org/wiki/ 92 Creole1Wiki http://wikicreole.org/wiki/ 93 Creole2Wiki http://wiki.wikicreole.org/ 94 95 MediaWiki http://www.mediawiki.org/wiki/ 96 97 SO http://stackoverflow.com/questions/ # Question $1 in StackOverflow 98 99 Transifex https://www.transifex.com/projects/p/trac/ 100 101 kwquery /query?group=status&keywords=~ # Custom query for tickets matching keyword $1 47 102 48 103 # … … 55 110 DebianBug http://bugs.debian.org/ 56 111 DebianPackage http://packages.debian.org/ 112 DebianPTS http://packages.qa.debian.org/ 57 113 Dictionary http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query= 58 114 Google http://www.google.com/search?q= 115 lmgtfy http://lmgtfy.com/?q= # Well, just search for "$1", follow the link to see how to do it... 59 116 GoogleGroups http://groups.google.com/group/$1/msg/$2 # Message $2 in $1 Google Group 117 gdiscussion https://groups.google.com/d/topic/$1/$2/discussion # Discussion $2 in $1 Google 118 gmessage https://groups.google.com/d/msg/$1/$2 # Message $2 in $1 Google Group 119 gforum https://groups.google.com/forum/#!forum/$1 # Forum $1 in Google Groups 60 120 JargonFile http://downlode.org/perl/jargon-redirect.cgi?term= 61 121 MeatBall http://www.usemod.com/cgi-bin/mb.pl? 62 122 MetaWiki http://sunir.org/apps/meta.pl? 63 123 MetaWikiPedia http://meta.wikipedia.org/wiki/ 64 MoinMoin http://moinmoin.wikiwikiweb.de/ 124 MoinMoin http://moinmo.in/ 125 TracHacks http://trac-hacks.org/wiki/ 126 OSM http://www.openstreetmap.org/wiki/ 65 127 WhoIs http://www.whois.sc/ 66 128 Why http://clublet.com/c/c/why? 67 c2Wiki 129 c2Wiki http://c2.com/cgi/wiki? 68 130 WikiPedia http://en.wikipedia.org/wiki/ 69 131 }}} 132 133 134 ---- 135 See also: InterWiki, InterTrac -
wiki/pages/InterTrac
r38413 r43921 9 9 == Link Syntax 10 10 11 Simply use the name of the other Trac environment as a prefix, followed by a colon, ending with the resource located in the other environment .11 Simply use the name of the other Trac environment as a prefix, followed by a colon, ending with the resource located in the other environment: 12 12 13 13 {{{ … … 18 18 19 19 That target environment name is either the real name of the environment or an alias for it. 20 The aliases are defined in `trac.ini` (see below).20 The aliases are defined in the `trac.ini` file, see below. 21 21 The prefix is case insensitive. 22 22 23 If the InterTrac link is enclosed in square brackets (like `[th:WikiExtrasPlugin]`), the InterTrac prefix is removed in the displayed link like a normal link resolver would be, ie the above would be displayed as `WikiExtrasPlugin`.23 If the InterTrac link is enclosed in square brackets, like `[th:WikiExtrasPlugin]`, the InterTrac prefix is removed in the displayed link like a normal link resolver would be, ie the above would be displayed as `WikiExtrasPlugin`. 24 24 25 For convenience, there 's also some alternative short-hand form, where one can use an aliasas an immediate prefix for the identifier of a ticket, changeset or report, eg `#T234`, `[T1508]`, `[trac 1508]`.25 For convenience, there is also an alternative short-hand form, where an alias can be used as an immediate prefix for the identifier of a ticket, changeset or report, eg `#T234`, `[T1508]`, `[trac 1508]`. 26 26 27 27 == Examples 28 28 29 It is necessary to set up a configuration for the InterTrac facility.30 This configuration has to be done in the TracIni file, `[intertrac]` section .29 It is necessary to set up a configuration for the InterTrac facility. 30 This configuration has to be done in the TracIni file, `[intertrac]` section, for example: 31 31 32 Example configuration:33 32 {{{#!ini 34 33 [intertrac] … … 44 43 This can be a relative URL in case that Trac environment is located on the same server. 45 44 46 The `.title` information will be used for providing an useful tooltip when moving the cursor over an InterTrac links.45 The `.title` information is used in a tooltip, ie when hovering the cursor over an InterTrac link. 47 46 48 47 Now, given the above configuration, one could create the following links: -
wiki/pages/InterWiki
r38413 r43921 5 5 An InterWiki link can be used for referring to a Wiki page located in another Wiki system, and by extension, to any object located in any other Web application, provided a simple URL mapping can be done. 6 6 7 At the extreme,InterWiki prefixes can even be used to simply introduce links to new protocols, such as `tsvn:` used by [trac:TortoiseSvn TortoiseSvn].7 InterWiki prefixes can even be used to simply introduce links to new protocols, such as `tsvn:` used by [trac:TortoiseSvn TortoiseSvn]. 8 8 9 9 == Link Syntax … … 27 27 28 28 '''Example:''' 29 {{{ 29 {{{#!ini 30 30 [interwiki] 31 31 MeatBall = http://www.usemod.com/cgi-bin/mb.pl? … … 62 62 63 63 Then, 64 * `MoinMoin:InterWikiMap` should be rendered as MoinMoin:InterWikiMap and the ''title'' for that link would be "!InterWikiMap in !MoinMoin" 65 * `Trac-ML:4346` should be rendered as Trac-ML:4346 and the ''title'' for that link would be "Message 4346 in Trac Mailing List" 64 * `MoinMoin:InterWikiMap` should be rendered as MoinMoin:InterWikiMap and the ''title'' for that link would be "!InterWikiMap in !MoinMoin". 65 * `Trac-ML:4346` should be rendered as Trac-ML:4346 and the ''title'' for that link would be "Message 4346 in Trac Mailing List". 66 66 67 67 ---- -
wiki/pages/TicketQuery
r40558 r43921 106 106 [[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]] 107 107 108 Finally, if you wish to receive only the number of defects that match the query, use the `count` parameter:108 If you wish to receive only the number of defects that match the query, use the `count` parameter: 109 109 {{{ 110 110 [[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]] … … 114 114 [[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]] 115 115 116 A graphical use of the macro is with the `format=progress` attribute: 117 {{{ 118 [[TicketQuery(milestone=0.12.8&group=type,format=progress)]] 119 }}} 120 121 For example for one of the upcoming milestones, bars are shown by ticket type: 122 [[TicketQuery(milestone=0.12.8&group=type,format=progress)]] 123 116 124 ---- 117 125 See also: TracQuery, TracTickets, TracReports, TracGuide -
wiki/pages/TracAccessibility
r40558 r43921 1 = Accessibility Support in Trac =1 = Accessibility Support in Trac 2 2 3 Not every user has a graphic environment with a mouse or other pointing device. Some users rely on keyboard, alternative keyboard or voice input to navigate links , activate form controls, etc. In a Trac session, users can use devices other than a pointing device by enabling keyboard shortcuts through the [/prefs/keybindings Keyboard Shortcuts] preferences panel.3 Not every user has a graphic environment with a mouse or other pointing device. Some users rely on keyboard, alternative keyboard or voice input to navigate links and activate form controls. In a Trac session, users can use devices other than a pointing device by enabling keyboard shortcuts through the [/prefs/keybindings Keyboard Shortcuts] preferences panel. 4 4 5 Trac supports accessibility keys for the most common operations. The access keys differ by browser and the following work for several browsers , but see [http://en.wikipedia.org/wiki/Access_key#Access_in_different_browsers access in different browsers] for more details.5 Trac supports accessibility keys for the most common operations. The access keys differ by browser and the following work for several browsers: 6 6 - on Linux platforms, press any of the keys listed below in combination with the `<Alt>` key 7 7 - on a Mac, use the `<Ctrl>` + `<Opt>` key instead 8 8 - on Windows, you need to hit `<Shift> + <Alt> + <Key>`. This works for the most common browsers, such as Firefox, Chrome, Safari and Internet Explorer 9 9 10 == Global Access Keys == 10 Also see [wikipedia:Access_key#Access_in_different_browsers access in different browsers] for more details. 11 12 == Global Access Keys 11 13 12 14 * `1` - WikiStart … … 21 23 * `f` - Search 22 24 25 == TracBrowser Access Keys 26 27 * `j` - Select next entry 28 * `k` - Select previous entry 29 * `o` - Expand folder/view file 30 * `<Enter>` - Expand folder/view file 23 31 24 32 ---- -
wiki/pages/TracAdmin
r40558 r43921 4 4 [[TracGuideToc]] 5 5 6 Trac is distributed with a powerful command-line configuration tool. This tool can be used 6 Trac is distributed with a powerful command-line configuration tool. This tool can be used to configure and customize your Trac-installation to better fit your needs. 7 7 8 Some of those operations can also be performed via the web administration module.8 Some of those configurations can also be performed via the web administration module. 9 9 10 10 == Usage 11 11 12 For nearly every `trac-admin` command, you 'll need to specify the path to the TracEnvironment that you want to administer as the first argument, for example:12 For nearly every `trac-admin` command, you will need to specify the path to the TracEnvironment that you want to administer as the first argument: 13 13 {{{ 14 14 trac-admin /path/to/projenv wiki list 15 15 }}} 16 16 17 The only exception is for the `help` command, but even in this case if you omit the environment, you 'll only get a very succinct list of commands (`help` and `initenv`), the same list you'd get when invoking `trac-admin` alone.17 The only exception is for the `help` command, but even in this case if you omit the environment, you will only get a very succinct list of commands (`help` and `initenv`), the same list you would get when invoking `trac-admin` alone. 18 18 Also, `trac-admin --version` will tell you about the Trac version (e.g. 0.12) corresponding to the program. 19 19 20 If you want to get a comprehensive list of the available commands and sub-commands, you need tospecify an existing environment:20 To get a comprehensive list of the available commands and sub-commands, specify an existing environment: 21 21 {{{ 22 22 trac-admin /path/to/projenv help … … 24 24 25 25 Some commands have a more detailed help, which you can access by specifying the command's name as a subcommand for `help`: 26 27 26 {{{ 28 27 trac-admin /path/to/projenv help <command> … … 31 30 === `trac-admin <targetdir> initenv` === #initenv 32 31 33 This subcommand is very important as i t's the one used to create a TracEnvironment in the specified `<targetdir>`. That directory must not exist prior to the call.32 This subcommand is very important as is the one used to create a TracEnvironment in the specified `<targetdir>`. That directory must not exist prior to the call. 34 33 35 34 [[TracAdminHelp(initenv)]] … … 38 37 See TracIni#GlobalConfiguration. 39 38 40 Note that in version 0.11 of Trac, `initenv` lost an extra last argument `<templatepath>`, which was used in previous versions to point to the `templates` folder. If you are using the one-liner '`trac-admin /path/to/trac/ initenv <projectname> <db> <repostype> <repospath>`' in the above and getting an error that reads ''''`Wrong number of arguments to initenv: 4`'''', then this is because you're using a `trac-admin` script from an '''older''' version of Trac.39 Note that in version 0.11 of Trac, `initenv` lost an extra last argument `<templatepath>`, which was used in previous versions to point to the `templates` folder. If you are using the one-liner `trac-admin /path/to/trac/ initenv <projectname> <db> <repostype> <repospath>` in the above and get an error that reads `Wrong number of arguments to initenv: 4`, then this is because you are using a `trac-admin` script from an '''older''' version of Trac. 41 40 42 41 == Interactive Mode … … 46 45 (on non-Windows environments, and when the Python `readline` module is available) and automatic repetition of the last command issued. 47 46 48 Once you 're in interactive mode, you can also get help on specific commands or subsets of commands:47 Once you are in interactive mode, you can also get help on specific commands or subsets of commands: 49 48 50 49 For example, to get an explanation of the `resync` command, run: 51 50 {{{ 52 >help resync51 $ help resync 53 52 }}} 54 53 55 54 To get help on all the Wiki-related commands, run: 56 55 {{{ 57 >help wiki56 $ help wiki 58 57 }}} 59 58 60 59 == Full Command Reference 61 60 62 You 'll find below the detailed help for all the commands available by default in `trac-admin`. Note that this may not match the list given by `trac-admin <yourenv> help`, as the commandspertaining to components disabled in that environment won't be available and conversely some plugins activated in the environment can add their own commands.61 You will find below the detailed help for all the commands available by default in `trac-admin`. Note that this may not match the list given by `trac-admin <yourenv> help`, as the commands pertaining to components disabled in that environment won't be available and conversely some plugins activated in the environment can add their own commands. 63 62 64 63 [[TracAdminHelp()]] -
wiki/pages/TracBackup
r40558 r43921 3 3 [[TracGuideToc]] 4 4 5 Backups are simply a copied snapshot of the entire [wiki:TracEnvironment project environment] directory, including the database. Backups can be created using the `hotcopy` command in [wiki:TracAdmin trac-admin].5 Trac backups are simply a copied snapshot of the entire [wiki:TracEnvironment project environment] directory, including the database. Backups can be created using the `hotcopy` command in [wiki:TracAdmin trac-admin]. 6 6 7 7 '''Note''': Trac uses the `hotcopy` nomenclature to match that of [http://subversion.tigris.org/ Subversion], to make it easier to remember when managing both Trac and Subversion servers. … … 20 20 Please note, the `hotcopy` command will not overwrite a target directory and when such exists, the operation ends with an error: `Command failed: [Errno 17] File exists:` This is discussed in [trac:ticket:3198 #3198]. 21 21 22 == =Restoring a Backup22 == Restoring a Backup 23 23 24 24 To restore an environment from a backup, stop the process running Trac, ie the Web server or [wiki:TracStandalone tracd], restore the contents of your backup (path/to/backupdir) to your [wiki:TracEnvironment project environment] directory and restart the service. … … 28 28 psql -U <user> -d <database> -f postgresql.dump 29 29 }}} 30 30 31 The `<database>` option is the same as the [TracEnvironment#DatabaseConnectionStrings database connection string] in the `[trac]` `database` option of //trac.ini//. 31 32 -
wiki/pages/TracBatchModify
r40558 r43921 2 2 [[TracGuideToc]] 3 3 4 Trac supports modifying a batch of tickets in one request from [TracQuery custom query] results 4 Trac supports modifying a batch of tickets in one request from [TracQuery custom query] results. 5 5 6 6 To perform a batch modification, select the tickets you wish to modify and set the new field values using the section underneath the query results. -
wiki/pages/TracBrowser
r40558 r43921 27 27 For Subversion, this list contains by default the top-level trunk directory and sub-directories of the top-level branches and tags directories (`/trunk`, `/branches/*`, and `/tags/*`). This can be [TracIni#svn-section configured] for more advanced cases. 28 28 29 If you're using a Javascript enabled browser, you'll be able to expand and collapse directories in-place by clicking on the arrow head at the right side of a directory. Alternatively, the [trac:Trac Keyskeyboard] can also be used for this:29 If you're using a Javascript enabled browser, you'll be able to expand and collapse directories in-place by clicking on the arrow head at the right side of a directory. Alternatively, the [trac:TracAccessibility keyboard] can also be used for this: 30 30 - use `j` and `k` to select the next or previous entry, starting with the first 31 31 - `o` ('''o'''pen) to toggle between expanded and collapsed state of the selected -
wiki/pages/TracChangeLog
r40558 r43921 6 6 7 7 8 == 1.2.x Releases 9 10 === 1.2 'Hermes' 11 12 //(November 5, 2016)// 13 14 Trac 1.2 is the first major release of Trac in more than 4 years. 15 16 The following are some highlights from the release: 17 18 * Extensible notification system ([trac:#3517]) 19 * Notification preference panel ([trac:#4056]) 20 * Usernames replaced with full names ([trac:#7339]) 21 * Restyled ticket changelog ([trac:#11835]) 22 * Workflow controls on the //New Ticket// page ([trac:#2045]) 23 * Editable wiki page version comments ([trac:#6573]) 24 * Datetime custom fields ([trac:#1942]) 25 26 For more information see the [trac:wiki:TracDev/ApiChanges/1.2 API changes] and the detailed 27 release notes for [[trac:wiki:TracDev/ReleaseNotes/1.2#DevelopmentReleases | 1.2]] and [[trac:wiki:TracDev/ReleaseNotes/1.0#MaintenanceReleases | 1.0.8 through 1.0.13]] 28 (as 1.2 contains all the fixes done for 1.0.8 through 1.0.13). 29 30 [trac:source:/tags/trac-1.2 View Tag] | [trac:milestone:1.2 View Milestone] 31 8 32 == 1.1.x Releases 9 33 // 1.1.x releases are development releases leading eventually to Trac 1.2. See them as kind of snapshots of [trac:source:trunk]. 10 34 11 35 ** No guarantees of feature and API compatibility is made from one 1.1.x release to the next. // 36 37 === 1.2rc1 38 39 //(September 14, 2016)// 40 41 The first Trac 1.2 release candidate is the culmination of nearly 4 years of development. 42 43 Highlights of the changes since 1.1.6: 44 45 - Pygments lexer options can be specified as [WikiProcessors WikiProcessor] arguments and defaults can be set in the environment configuration ([trac:#5654]). 46 - Usernames are replaced with full names when `[trac]` `show_full_names` is true ([trac:#7339]). 47 - Enum tables on the Ticket Admin pages can be reordered by drag and drop. ([trac:#11682]). 48 - Ticket changelog is restyled and has a new //Show comments// preference ([trac:#11835]). 49 - Authentication cookies can be shared across subdomains when `[trac]` `auth_cookie_domain` is configured ([trac:#12251]). 50 51 For more information see the [trac:wiki:TracDev/ApiChanges/1.1 API changes] and the detailed 52 release notes for [[trac:wiki:TracDev/ReleaseNotes/1.1#DevelopmentReleases | 1.2rc1]] and [[trac:wiki:TracDev/ReleaseNotes/1.0#MaintenanceReleases | 1.0.8 through 1.0.13]] 53 (as 1.2rc1 contains all the fixes done for 1.0.8 through 1.0.13). 54 55 [trac:source:/tags/trac-1.2rc1 View Tag] | [trac:milestone:1.2 View Milestone] 12 56 13 57 === 1.1.6 … … 138 182 [trac:source:/tags/trac-1.1.1 View Tag] | [trac:milestone:1.1.1 View Milestone] 139 183 140 == 1.0.x Releases == 184 == 1.0.x Releases 185 186 === 1.0.13 187 188 //(September 11, 2016)// 189 190 Trac 1.0.13 provides around a dozen bug fixes and minor 191 enhancements. The following are some highlights: 192 193 - Use locale environment variables to negotiate locale 194 on console ([trac:#12418]). 195 - Fixed using incorrect revisions when downloading a zip 196 file via browser page from Git repository ([trac:#12557]). 197 198 [trac:source:/tags/trac-1.0.13 View Tag] | [trac:milestone:1.0.13 View Milestone] 199 200 === 1.0.12 201 202 //(July 4, 2016)// 203 204 Trac 1.0.12 provides around 20 bug fixes and minor enhancements. The following are some highlights: 205 206 - Reconnect to PostgreSQL server after restarting it 207 ([trac:#4984]). 208 - Workflow actions on the batch modify form are sorted 209 by the default attribute ([trac:#12447]). 210 - Fixed Pygments stylesheet not found when style name 211 contained a dash ([trac:#12505]). 212 - Fixed incorrect parsing of projects list file by 213 `GitwebProjectsRepositoryProvider` ([trac:#12518]). 214 - `TracIni` macro displays option documentation as 215 multi-line rather than one-liner ([trac:#12522]). 216 - Fixed regression with `GitConnector` leading to 217 `IOError: Too many open files` ([trac:#12524]). 218 219 [trac:source:/tags/trac-1.0.12 View Tag] | [trac:milestone:1.0.12 View Milestone] 220 221 === 1.0.11 222 223 //(May 7, 2016)// 224 225 Trac 1.0.11 provides more than 30 bug fixes and minor 226 enhancements. As in 1.0.10, an area of focus has been to 227 eliminate tracebacks in the logs due to invalid requests. 228 The following are some additional highlights: 229 230 - Fixed resetting //Oldest first// after auto-preview of 231 ticket change log ([trac:#12381]). 232 - Trac is now distributed as wheel package ([trac:#12391]). 233 - Fixed database exceptions in query system when 234 ''milestones/versions/enums'' are not defined and a custom 235 field of the same name is added ([trac:#12399]). 236 - Custom field //milestone// was not shown when 237 standard //milestone// field was hidden ([trac:#12400]). 238 - Query system now sorts by `enum.value` rather than 239 `ticket.type` for `order=type` ([trac:#12402]). 240 - Added support for Babel 2.3.2 (2.3.0 and 2.3.1 should 241 not be used) ([trac:#12445]). 242 243 [trac:source:/tags/trac-1.0.11 View Tag] | [trac:milestone:1.0.11 View Milestone] 244 245 === 1.0.10 246 247 //(February 20, 2016)// 248 249 Trac 1.0.10 provides more than 30 bug fixes and minor enhancements. Two areas of focus 250 have been fixing test failures on Windows and eliminating tracebacks in the logs due to 251 invalid requests. 252 253 See the detailed release notes for [[trac:wiki:TracDev/ReleaseNotes/1.0#MaintenanceReleases | 1.0.10]]. 254 255 [trac:source:/tags/trac-1.0.10 View Tag] | [trac:milestone:1.0.10 View Milestone] 256 257 === 1.0.9 258 259 //(September 10, 2015)// 260 261 Trac 1.0.9 provides more than a dozen minor fixes and enhancements, including significantly reduced memory usage by the Git repository connector. 262 263 See the detailed release notes for [[trac:wiki:TracDev/ReleaseNotes/1.0#MaintenanceReleases | 1.0.9]]. 264 265 [trac:source:/tags/trac-1.0.9 View Tag] | [trac:milestone:1.0.9 View Milestone] 266 267 === 1.0.8 268 269 //(July 24, 2015)// 270 271 Trac 1.0.8 fixes a regression introduced in Trac 1.0.7: the session 272 for an authenticated username containing non-alphanumeric characters 273 could not be retrieved, resulting in the user being denied access to 274 every realm and resource ([trac:#12129]). 275 276 See the detailed release notes for [[trac:wiki:TracDev/ReleaseNotes/1.0#MaintenanceReleases | 1.0.8]]. 277 278 [trac:source:/tags/trac-1.0.8 View Tag] | [trac:milestone:1.0.8 View Milestone] 141 279 142 280 === 1.0.7 … … 164 302 - Hyphen character can be used in !WikiProcessor parameter name ([trac:#12023]). 165 303 166 See the detailed release notes for [[trac:wiki:TracDev/ReleaseNotes/1.0#MaintenanceReleases | 1.0.6]] and [[trac:wiki:TracDev/ReleaseNotes/0.12#MaintenanceReleases | 0.12.7]] (as 1.0.6 contains allthe changes in 0.12.7).304 See the detailed release notes for [[trac:wiki:TracDev/ReleaseNotes/1.0#MaintenanceReleases | 1.0.6]] and [[trac:wiki:TracDev/ReleaseNotes/0.12#MaintenanceReleases | 0.12.7]] (as 1.0.6 also contains the changes in 0.12.7). 167 305 168 306 [trac:source:/tags/trac-1.0.6 View Tag] | [trac:milestone:1.0.6 View Milestone] … … 176 314 - Images are not rendered in the timeline ([trac:#10751]). 177 315 - Git tags are shown in the browser view ([trac:#11964]). 178 - Added support for `journal_mode` and `synchronous` pragmas in `sqlite:` database connection string ([trac:#11967]). 316 - Added support for `journal_mode` and `synchronous` pragmas 317 in `sqlite:` database connection string ([trac:#11967]). 179 318 180 319 See the detailed release notes for [[trac:wiki:TracDev/ReleaseNotes/1.0#MaintenanceReleases | 1.0.5]]. … … 299 438 === 0.12.7 300 439 301 //( May 20, 2015)//440 //(July 12, 2015)// 302 441 303 442 Trac 0.12.7 fixes a minor security issue, as well as a half dozen other minor issues: -
wiki/pages/TracChangeset
r40558 r43921 1 = Trac Changeset Module = 1 = Trac Changeset Module 2 2 3 [[TracGuideToc]] 4 [[PageOutline(2-5,Contents,pullout)]] 3 5 4 Trac has a built-in functionality for visualizing “diffs”, or changes to files.6 Trac has a built-in functionality for visualizing "diffs", or changes to files. 5 7 6 8 There are different kinds of ''change sets''. Some correspond to revisions made in the repositories, others aggregate changes made in several revisions. Ultimately, any kind of difference can be shown. … … 8 10 The changeset view consists of two parts, the ''header'' and the ''diff views''. 9 11 10 == Changeset Header ==12 == Changeset Header 11 13 12 14 The header shows an overview of the whole changeset. … … 30 32 The color legend is located below the header as a reminder. 31 33 32 == Diff Views ==34 == Diff Views 33 35 34 36 Below the header is the main part of the changeset, the diff view. Each file is shown in a separate section, each of which contains only the regions of the file that are affected by the changeset. There are two different styles to display the diffs: ''inline'' or ''side-by-side''. You can switch between the styles using the preferences form: … … 41 43 * You can toggle whether blank lines, case changes and white space changes are ignored, thereby letting you find the functional changes more quickly. 42 44 43 == The Different Ways to Get a Diff ==45 == The Different Ways to Get a Diff 44 46 45 === Examining a Changeset ===47 === Examining a Changeset 46 48 47 49 When viewing a repository check-in, such as when following a changeset [wiki:TracLinks link] or a changeset event in the [wiki:TracTimeline timeline], Trac will display the exact changes made by the check-in. … … 49 51 There will be also navigation links to the ''Previous Changeset'' to and ''Next Changeset''. 50 52 51 === Examining Differences Between Revisions ===53 === Examining Differences Between Revisions 52 54 53 55 Often you want to look at changes made on a file or on a directory spanning multiple revisions. The easiest way to get there is from the TracRevisionLog, where you can select the ''old'' and the ''new'' revisions of the file or directory, and then click the ''View changes'' button. 54 56 55 === Examining Differences Between Branches ===57 === Examining Differences Between Branches 56 58 57 One of the core features of version control systems is the possibility to work simultaneously on different ''Lines of Developments'', commonly called “branches”. Trac enables you to examine the exact differences between such branches.59 One of the core features of version control systems is the possibility to work simultaneously on different ''Lines of Developments'', commonly called "branches". Trac enables you to examine the exact differences between such branches. 58 60 59 61 Using the '''View changes ...''' button in the TracBrowser allows you to enter ''From:'' and ''To:'' path/revision pairs. The resulting set of differences consist of the changes that should be applied to the ''From:'' content to get to the ''To:'' content. … … 61 63 For convenience, it is possible to invert the roles of the ''old'' and the ''new'' path/revision pairs by clicking the ''Reverse Diff'' link on the changeset page. 62 64 63 === Checking the Last Change ===65 === Checking the Last Change 64 66 65 67 Another way to examine changes is to use the ''Last Change'' link provided by the TracBrowser. -
wiki/pages/TracEnvironment
r40558 r43921 2 2 3 3 [[TracGuideToc]] 4 [[PageOutline(2-5 )]]4 [[PageOutline(2-5,Contents,pullout)]] 5 5 6 6 Trac uses a directory structure and a database for storing project data. The directory is referred to as the environment. 7 Trac uses a directory structure and a database for storing project data. The directory is referred to as the '''environment'''. 8 9 Trac supports [http://sqlite.org/ SQLite], [http://www.postgresql.org/ PostgreSQL] and [http://mysql.com/ MySQL] databases. With PostgreSQL and MySQL you have to create the database before running `trac-admin initenv`. 7 10 8 11 == Creating an Environment 9 12 10 A new Trac environment is created using [TracAdmin#initenv trac-admin's initenv]:13 A new Trac environment is created using the [TracAdmin#initenv initenv] command: 11 14 {{{#!sh 12 15 $ trac-admin /path/to/myproject initenv 13 16 }}} 14 17 15 `trac-admin` will ask you for the name of the project and the database connection string, see below.18 `trac-admin` will ask you for the name of the project and the [#DatabaseConnectionStrings database connection string]. 16 19 17 20 === Useful Tips … … 21 24 - The user under which the web server runs will require file system write permission to the environment directory and all the files inside. Please remember to set the appropriate permissions. The same applies to the source code repository, although the user under which Trac runs will only require write access to a Subversion repository created with the BDB file system; for other repository types, check the corresponding plugin's documentation. 22 25 23 - `initenv` , when using an svn repository, does not imply that trac-admin will perform `svnadmin create` for the specified repository path. You need to perform the `svnadmin create` prior to `trac-admin initenv` if you're creating a new svn repository altogether with a new Trac environment; otherwise you will see a message "Warning: couldn't index the repository" when initializing the environment.26 - `initenv` does not create a version control repository for the specified path. If you wish to specify a default repository using optional the arguments to `initenv` you must create the repository first, otherwise you will see a message when initializing the environment: //Warning: couldn't index the default repository//. 24 27 25 28 - Non-ascii environment paths are not supported. 26 27 - Also, it seems that project names with spaces can be problematic for authentication, see [trac:#7163].28 29 29 - TracPlugins located in a [TracIni#inherit-section shared plugins folder] that is defined in an [TracIni#GlobalConfiguration inherited configuration] are currently not loaded during creation, and hence, if they need to create extra tables for example, you'll need to [TracUpgrade#UpgradetheTracEnvironment upgrade the environment] before being able to use it.30 - TracPlugins located in a [TracIni#inherit-section shared plugins folder] that is defined in an [TracIni#GlobalConfiguration inherited configuration] are not loaded during creation, and hence, if they need to create extra tables for example, you'll need to [TracUpgrade#UpgradetheTracEnvironment upgrade the environment]. Alternatively you can avoid the need to upgrade the environment by specifying a configuration file at the time the environment is created, using the `--config` option. See TracAdmin#FullCommandReference for more information. 30 31 31 32 {{{#!div style="border: 1pt dotted; margin: 1em" … … 38 39 == Database Connection Strings 39 40 40 Trac supports [http://sqlite.org/ SQLite], [http://www.postgresql.org/ PostgreSQL] and [http://mysql.com/ MySQL] database backends. The default is SQLite, which is probably sufficient for most projects. The database file is thenstored in the environment directory, and can easily be [wiki:TracBackup backed up] together with the rest of the environment.41 You will need to specify a database connection string at the time the environment is created. The default is SQLite, which is probably sufficient for most projects. The SQLite database file is stored in the environment directory, and can easily be [wiki:TracBackup backed up] together with the rest of the environment. 41 42 42 43 Note that if the username or password of the connection string (if applicable) contains the `:`, `/` or `@` characters, they need to be URL encoded. … … 52 53 === PostgreSQL Connection String 53 54 54 If you want to use PostgreSQL instead, you'll have to use a different connection string. For example, to connect to a PostgreSQL database on the same machine called `trac` for user `johndoe` with the password `letmein`use:55 The connection string for PostgreSQL is a bit more complex. For example, to connect to a PostgreSQL database named `trac` on `localhost` for user `johndoe` and password `letmein`, use: 55 56 {{{ 56 57 postgres://johndoe:letmein@localhost/trac … … 72 73 }}} 73 74 74 Note that with PostgreSQL you will have to create the database before running `trac-admin initenv`.75 76 75 See the [http://www.postgresql.org/docs/ PostgreSQL documentation] for detailed instructions on how to administer [http://postgresql.org PostgreSQL]. 77 76 Generally, the following is sufficient to create a database user named `tracuser` and a database named `trac`: … … 83 82 When running `createuser` you will be prompted for the password for the user 'tracuser'. This new user will not be a superuser, will not be allowed to create other databases and will not be allowed to create other roles. These privileges are not needed to run a Trac instance. If no password is desired for the user, simply remove the `-P` and `-E` options from the `createuser` command. Also note that the database should be created as UTF8. LATIN1 encoding causes errors, because of Trac's use of unicode. SQL_ASCII also seems to work. 84 83 85 Under some default configurations (Debian) one will haverun the `createuser` and `createdb` scripts as the `postgres` user:84 Under some default configurations (Debian), run the `createuser` and `createdb` scripts as the `postgres` user: 86 85 {{{#!sh 87 86 $ sudo su - postgres -c 'createuser -U postgres -S -D -R -E -P tracuser' … … 96 95 === MySQL Connection String 97 96 98 The format of the MySQL connection string is similar to those for PostgreSQL, with the `postgres` scheme being replaced by `mysql`. For example, to connect to a MySQL database on the same machine called `trac` for user `johndoe` with password `letmein`:97 The format of the MySQL connection string is similar to those for PostgreSQL, with the `postgres` scheme being replaced by `mysql`. For example, to connect to a MySQL database on `localhost` named `trac` for user `johndoe` with password `letmein`: 99 98 {{{ 100 99 mysql://johndoe:letmein@localhost:3306/trac … … 103 102 == Source Code Repository 104 103 105 A single environment can be connected to more than one repository. However, by default Trac is not connected to any source code repository, and the ''Browse Source'' toolbaritem will not be displayed.104 A single environment can be connected to more than one repository. However, by default Trac is not connected to any source code repository, and the ''Browse Source'' navigation item will not be displayed. 106 105 107 106 There are many different ways to connect repositories to an environment, see TracRepositoryAdmin. A single repository can be specified when the environment is created by passing the optional arguments `repository_type` and `repository_dir` to the `initenv` command. … … 109 108 == Directory Structure 110 109 111 An environment directory will usually consistof the following files and directories:110 An environment consists of the following files and directories: 112 111 113 112 * `README` - Brief description of the environment. -
wiki/pages/TracFastCgi
r40558 r43921 4 4 [[PageOutline(2-5, Contents, floated)]] 5 5 6 [http://www.fastcgi.com/ FastCGI] interface allows Trac to remain resident much like with [wiki:TracModPython mod_python] or [wiki:TracModWSGI mod_wsgi]. It is faster than external CGI interfaces which must start a new process for each request. Additionally, it is supported bymuch wider variety of web servers.6 [http://www.fastcgi.com/ FastCGI] interface allows Trac to remain resident much like with [wiki:TracModPython mod_python] or [wiki:TracModWSGI mod_wsgi]. It is faster than external CGI interfaces which must start a new process for each request. Additionally, it is supported by a much wider variety of web servers. 7 7 8 8 Note that unlike mod_python, FastCGI supports [http://httpd.apache.org/docs/suexec.html Apache SuEXEC], ie run with different permissions than the web server runs with. `mod_wsgi` supports the `WSGIDaemonProcess` with user / group parameters to achieve the same effect. … … 10 10 '''Note for Windows:''' Trac's FastCGI does not run under Windows, as Windows does not implement `Socket.fromfd`, which is used by `_fcgi.py`. If you want to connect to IIS, you may want to try [trac:TracOnWindowsIisAjp AJP]/[trac:TracOnWindowsIisAjp ISAPI]. 11 11 12 == Simple Apache configuration 13 14 There are two FastCGI modules commonly available for Apache: `mod_fastcgi` and 15 `mod_fcgid` (preferred). The latter is more up-to-date. 12 == Apache configuration 13 14 There are two FastCGI modules commonly available for Apache: `mod_fastcgi` and `mod_fcgid` (preferred). The latter is more up-to-date. 16 15 17 16 The following sections focus on the FCGI specific setup, see also [wiki:TracModWSGI#ConfiguringAuthentication] for configuring the authentication in Apache. 18 17 19 Regardless of which cgi module is used, be sure the web server has executable permissions on the cgi-bin folder. While FastCGI will throw specific permissions errors, mod_fcgid will throw an ambiguous error if this has not been done . Connection reset by peer: mod_fcgid: error reading data from FastCGI server.18 Regardless of which cgi module is used, be sure the web server has executable permissions on the cgi-bin folder. While FastCGI will throw specific permissions errors, mod_fcgid will throw an ambiguous error if this has not been done: `Connection reset by peer: mod_fcgid: error reading data from FastCGI server`. 20 19 21 20 === Set up with `mod_fastcgi` 22 21 23 22 `mod_fastcgi` uses `FastCgiIpcDir` and `FastCgiConfig` directives that should be added to an appropriate Apache configuration file: 24 {{{ 23 {{{#!apache 25 24 # Enable fastcgi for .fcgi files 26 25 # (If you're using a distro package for mod_fcgi, something like … … 32 31 LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so 33 32 }}} 33 34 34 Setting `FastCgiIpcDir` is optional if the default is suitable. Note that the `LoadModule` line must be after the `IfModule` group. 35 35 36 Configure `ScriptAlias` or similar options as described in TracCgi, but 37 calling `trac.fcgi` instead of `trac.cgi`. 36 Configure `ScriptAlias` or similar options as described in TracCgi, but calling `trac.fcgi` instead of `trac.cgi`. 38 37 39 38 Add the following to the Apache configuration file (below the `FastCgiIpcDir` line) if you intend to set up the `TRAC_ENV` as an overall default: 40 {{{ 39 {{{#!apache 41 40 FastCgiConfig -initial-env TRAC_ENV=/path/to/env/trac 42 41 }}} 43 42 44 43 Alternatively, you can serve multiple Trac projects in a directory by adding this: 45 {{{ 44 {{{#!apache 46 45 FastCgiConfig -initial-env TRAC_ENV_PARENT_DIR=/parent/dir/of/projects 47 46 }}} … … 50 49 51 50 Configure `ScriptAlias` (see TracCgi for details), but call `trac.fcgi` instead of `trac.cgi`: 52 {{{ 51 {{{#!apache 53 52 ScriptAlias /trac /path/to/www/trac/cgi-bin/trac.fcgi/ 54 53 }}} 54 55 55 Note the slash at the end. 56 56 57 To set up Trac environment for `mod_fcgid` it is necessary to use `DefaultInitEnv` directive. It cannot be used in `Directory` or `Location` context, so if you need to support multiple projects, try alternative environment setup below. 58 59 {{{ 57 To set up Trac environment for `mod_fcgid` it is necessary to use `DefaultInitEnv` directive. It cannot be used in `Directory` or `Location` context, so if you need to support multiple projects, try the alternative environment setup below: 58 {{{#!apache 60 59 DefaultInitEnv TRAC_ENV /path/to/env/trac/ 61 60 }}} 62 61 63 === alternative environment setup64 65 A better method to specify path to the Trac environment is to embed the path into `trac.fcgi` script itself. That doesn't require configuration of the server environment variables, works for both [trac:FastCgi] modules as well as for [http://www.lighttpd.net/ lighttpd] and CGI:66 {{{ 62 === Alternative environment setup 63 64 A better method to specify the path to the Trac environment is to embed the path into `trac.fcgi` script itself. That doesn't require configuration of the server environment variables, works for both [trac:FastCgi] modules as well as for [http://www.lighttpd.net/ lighttpd] and CGI: 65 {{{#!python 67 66 import os 68 67 os.environ['TRAC_ENV'] = "/path/to/projectenv" 69 68 }}} 69 70 70 or: 71 {{{ 71 {{{#!python 72 72 import os 73 73 os.environ['TRAC_ENV_PARENT_DIR'] = "/path/to/project/parent/dir" … … 77 77 78 78 See [https://coderanger.net/~coderanger/httpd/fcgi_example.conf this fcgid example config] which uses a !ScriptAlias directive with trac.fcgi with a trailing / like this: 79 {{{ 79 {{{#!apache 80 80 ScriptAlias / /srv/tracsite/cgi-bin/trac.fcgi/ 81 81 }}} 82 82 83 == SimpleCherokee Configuration84 85 The configuration on Cherokee's side is quite simple. You will only need to know that you can spawn Trac as an SCGI process.86 You can either start it manually, or better yet, automatically by letting Cherokee spawn the server whenever it is down. 83 == Cherokee Configuration 84 85 Configuring [http://cherokee-project.com/ Cherokee] with Trac is straightforward, if you spawn Trac as an SCGI process. You can either start it manually, or better yet, automatically by letting Cherokee spawn the server whenever it is down. 86 87 87 First set up an information source in cherokee-admin with a local interpreter: 88 88 … … 98 98 99 99 After doing this, we will just have to create a new rule managed by the SCGI handler to access Trac. It can be created in a new virtual server, trac.example.net for instance, and will only need two rules. The '''default''' one will use the SCGI handler associated to the previously created information source. 100 The second rule will be there to serve the few static files needed to correctly display the Trac interface. Create it as ''Directory rule'' for ''/common'' and just set it to the ''Static files'' handler and with a ''Document root'' that points to the appropriate files: ''$TRAC_LOCAL/htdocs/'' (where $TRAC_LOCAL is a directory defined by the user or the system administrator to place local trac resources). 101 102 Note:\\ 103 If the tracd process fails to start up, and cherokee displays a 503 error page, you might be missing the [http://trac.saddi.com/flup python-flup] package.\\ 104 Python-flup is a dependency which provides trac with SCGI capability. You can install it on debian based systems with: 105 {{{ 100 The second rule will be there to serve the few static files needed to correctly display the Trac interface. Create it as ''Directory rule'' for ''/common'' and just set it to the ''Static files'' handler and with a ''Document root'' that points to the appropriate files: ''$TRAC_LOCAL/htdocs/'' (where $TRAC_LOCAL is a directory defined by the user or the system administrator to place local Trac resources). 101 102 '''Note:''' If the tracd process fails to start up, and Cherokee displays a 503 error page, you might be missing the [http://trac.saddi.com/flup python-flup] package ([trac:#9903]). Python-flup is a dependency which provides Trac with SCGI capability. You can install it on Debian based systems with: 103 {{{#!sh 106 104 sudo apt-get install python-flup 107 105 }}} 108 106 109 == SimpleLighttpd Configuration107 == Lighttpd Configuration 110 108 111 109 The FastCGI front-end was developed primarily for use with alternative webservers, such as [http://www.lighttpd.net/ Lighttpd]. … … 157 155 }}} 158 156 159 Note that field values are different. If you prefer setting the environment variables in the `.fcgi` scripts, then copy/rename `trac.fcgi`, eg to `first.fcgi` and `second.fcgi`, and reference them in the above settings.157 Note that the field values are different. If you prefer setting the environment variables in the `.fcgi` scripts, then copy/rename `trac.fcgi`, eg to `first.fcgi` and `second.fcgi`, and reference them in the above settings. 160 158 Note that the above will result in different processes in any event, even if both are running from the same `trac.fcgi` script. 161 159 162 {{{ 163 #!div class=important 164 '''Note''' It's very important the order on which server.modules are loaded, if mod_auth is not loaded '''BEFORE''' mod_fastcgi, then the server will fail to authenticate the user. 160 {{{#!div class=important 161 '''Note:''' The order in which the server.modules are loaded is very important: if mod_auth is not loaded '''before''' mod_fastcgi, then the server will fail to authenticate the user. 165 162 }}} 166 163 … … 202 199 203 200 }}} 201 204 202 Note that Lighttpd (v1.4.3) stops if the password file doesn't exist. 205 203 … … 232 230 233 231 The technique can be easily adapted for use with multiple projects by creating aliases for each of them, and wrapping the fastcgi.server declarations inside conditional configuration blocks. 234 Also there is another way to handle multiple projects and it's to use TRAC_ENV_PARENT_DIR instead of TRAC_ENV and use global auth, let's see an example: 232 233 Also there is another way to handle multiple projects and it uses `TRAC_ENV_PARENT_DIR` instead of `TRAC_ENV` as well as global authentication: 235 234 {{{ 236 235 # This is for handling multiple projects … … 276 275 ) 277 276 }}} 277 278 278 For details about languages specification see [trac:TracFaq TracFaq] question 2.13. 279 279 280 280 Other important information like the [wiki:TracInstall#MappingStaticResources mapping static resources advices] are useful for non-fastcgi specific installation aspects. 281 ]282 281 283 282 Relaunch Lighttpd and browse to `http://yourhost.example.org/trac` to access Trac. … … 285 284 Note about running Lighttpd with reduced permissions: If nothing else helps and trac.fcgi doesn't start with Lighttpd settings `server.username = "www-data"`, `server.groupname = "www-data"`, then in the `bin-environment` section set `PYTHON_EGG_CACHE` to the home directory of `www-data` or some other directory accessible to this account for writing. 286 285 287 == Simple!LiteSpeed Configuration286 == !LiteSpeed Configuration 288 287 289 288 The FastCGI front-end was developed primarily for use with alternative webservers, such as [http://www.litespeedtech.com/ LiteSpeed]. … … 292 291 293 292 1. Please make sure you have a working install of a Trac project. Test install with "tracd" first. 294 295 2. Create a Virtual Host for this setup. From now on we will refer to this vhost as !TracVhost. For this tutorial we will be assuming that your Trac project will be accessible via: 293 1. Create a Virtual Host for this setup. From now on we will refer to this vhost as !TracVhost. For this tutorial we will be assuming that your Trac project will be accessible via: 296 294 {{{ 297 295 http://yourdomain.com/trac/ 298 296 }}} 299 300 3. Go "!TracVhost → External Apps" tab and create a new "External Application". 297 1. Go "!TracVhost → External Apps" tab and create a new "External Application": 301 298 {{{ 302 299 Name: MyTracFCGI … … 314 311 Instances: 10 315 312 }}} 316 317 4. Optional: If you need to use htpasswd based authentication. Go to "!TracVhost → Security" tab and create a new security Realm. 318 319 {{{ 313 1. Optional: If you need to use htpasswd based authentication. Go to "!TracVhost → Security" tab and create a new security Realm: 314 {{{ 320 315 DB Type: Password File 321 316 Realm Name: MyTracUserDB <--- any name you wish and referenced later 322 317 User DB Location: /fullpathto/htpasswd <--- path to your htpasswd file 323 318 }}} 324 325 If you don’t have a htpasswd file or don’t know how to create the entries within one, go to http://sherylcanter.com/encrypt.php, to generate the user:password combos. 326 327 5. Go to "!PythonVhost → Contexts" and create a new FCGI Context. 328 329 {{{ 319 If you don’t have a htpasswd file or don’t know how to create the entries within one, go to http://sherylcanter.com/encrypt.php, to generate the user:password combos. 320 1. Go to "!PythonVhost → Contexts" and create a new FCGI Context: 321 {{{ 330 322 URI: /trac/ <--- URI path to bind to python fcgi app we created 331 Fast CGI App: [VHost Level] MyTractFCGI <--- select the trac fcgi extapp we just created323 Fast CGI App: [VHost Level] MyTractFCGI <--- select the Trac fcgi extapp we just created 332 324 Realm: TracUserDB <--- only if (4) is set. select realm created in (4) 333 325 }}} 334 335 6. Modify `/fullpathto/mytracproject/conf/trac.ini` 336 337 {{{ 326 1. Modify `/fullpathto/mytracproject/conf/trac.ini`: 327 {{{ 338 328 #find/set base_rul, url, and link variables 339 329 base_url = http://yourdomain.com/trac/ <--- base url to generate correct links to … … 341 331 link = http://yourdomain.com/trac/ <--- link of graphic logo 342 332 }}} 343 344 7. Restart !LiteSpeed, “lswsctrl restart”, and access your new Trac project at: 345 346 {{{ 347 http://yourdomain.com/trac/ 348 }}} 349 350 == Simple Nginx Configuration 351 352 Nginx is able to communicate with FastCGI processes, but can not spawn them. So you need to start FastCGI server for Trac separately. 333 1. Restart !LiteSpeed: `lswsctrl restart`, and access your new Trac project at {{{http://yourdomain.com/trac/}}}. 334 335 == Nginx Configuration 336 337 [http://nginx.org/en/ Nginx] is able to communicate with FastCGI processes, but can not spawn them. So you need to start FastCGI server for Trac separately. 353 338 354 339 1. Nginx configuration with basic authentication handled by Nginx - confirmed to work on 0.6.32 355 {{{ 340 {{{#!nginx 356 341 server { 357 342 listen 10.9.8.7:443; … … 416 401 }}} 417 402 1. Modified trac.fcgi: 418 {{{ 403 {{{#!python 419 404 #!/usr/bin/env python 420 405 import os … … 447 432 448 433 }}} 449 1. reload nginx and launch trac.fcgi like that:434 1. Reload nginx and launch trac.fcgi: 450 435 {{{#!sh 451 436 trac@trac.example ~ $ ./trac-standalone-fcgi.py … … 453 438 454 439 The above assumes that: 455 * There is a user named 'trac' for running trac instances and keeping trac environments in its home directory456 * `/home/trac/instance` contains a trac environment440 * There is a user named 'trac' for running Trac instances and keeping Trac environments in its home directory 441 * `/home/trac/instance` contains a Trac environment 457 442 * `/home/trac/htpasswd` contains authentication information 458 * `/home/trac/run` is owned by the same group the nginx runs under443 * `/home/trac/run` is owned by the same group the Nginx runs under 459 444 * and if your system is Linux the `/home/trac/run` has setgid bit set (`chmod g+s run`) 460 * and patch from ticket #T7239is applied, or you'll have to fix the socket file permissions every time461 462 Unfortunately nginx does not support variable expansion in fastcgi_pass directive.445 * and patch from [trac:#7239] is applied, or you'll have to fix the socket file permissions every time 446 447 Unfortunately Nginx does not support variable expansion in fastcgi_pass directive. 463 448 Thus it is not possible to serve multiple Trac instances from one server block. 464 449 465 450 If you worry enough about security, run Trac instances under separate users. 466 451 467 Another way to run Trac as a FCGI external application is offered in ticket #T6224452 Another way to run Trac as a FCGI external application is offered in [trac:#6224]. 468 453 469 454 ---- 470 See also: 455 See also: TracGuide, TracInstall, [wiki:TracModWSGI ModWSGI], [wiki:TracCgi CGI], [wiki:TracModPython ModPython], [trac:TracNginxRecipe TracNginxRecipe] -
wiki/pages/TracGuide
r40558 r43921 1 = The Trac User and Administration Guide = 1 = The Trac User and Administration Guide 2 2 3 [[TracGuideToc]] 3 4 {{{#!span style="font-size:90%" … … 7 8 == Introduction 8 9 9 Trac is an enhanced wiki and issue tracking system for software development projects. Trac uses a minimalistic approach to web-based software project management. It strives to helpdevelopers write great software while staying out of the way. Trac should impose as little as possible on a team's established development process and policies.10 Trac is an enhanced wiki and issue tracking system for software development projects. Trac uses a minimalistic approach to web-based software project management. It helps developers write great software while staying out of the way. Trac should impose as little as possible on a team's established development process and policies. 10 11 11 It provides an interface to Subversion (and other version control systems), an integrated Wiki and convenient reporting facilities.12 It provides an interface to Subversion as well as other version control systems, an integrated Wiki and convenient reporting facilities. 12 13 13 14 Trac allows wiki markup in issue descriptions and commit messages, creating links and seamless references between bugs, tasks, changesets, files and wiki pages. A timeline shows all current and past project events in order, making the acquisition of an overview of the project and tracking progress very easy. The roadmap shows the road ahead, listing the upcoming milestones. 15 14 16 == User Guide 15 * Using the Wiki subsystem 17 18 * Using the Wiki subsystem: 16 19 * TracWiki — How to use the built-in Wiki. 17 20 * WikiFormatting — Reference to the wiki syntax used throughout. 18 * Using the Version Control subsystem 21 * Using the Version Control subsystem: 19 22 * TracBrowser — Browsing source code with Trac. 20 23 * TracChangeset — Viewing changes to source code. 21 24 * TracRevisionLog — Viewing change history. 22 * Using the Ticket subsystem 25 * Using the Ticket subsystem: 23 26 * TracTickets — Using the issue tracker. 24 27 * TracRoadmap — The roadmap helps tracking project progress. … … 26 29 * TracQuery — Executing custom ticket queries. 27 30 * TracBatchModify - Modifying a batch of tickets in one request. 28 * Other modules and general topics 31 * Other modules and general topics: 29 32 * TracSearch — Full text search in all content. 30 33 * TracTimeline — The timeline provides a historic perspective on a project. 31 34 * TracRss — RSS content syndication in Trac. 32 * TracAccessibility — Accessibility keys support 33 35 * TracAccessibility — Accessibility keys support. 34 36 35 37 == Administrator Guide 36 * Installation and upgrade 38 39 * Installation and upgrade: 37 40 * TracInstall — How to install and run Trac. 38 41 * TracUpgrade — How to upgrade existing installations. 39 42 * TracImport — Importing tickets from other bug databases. 40 43 * TracPlugins — Installing and managing Trac extensions. 41 * Configuration and customization 44 * Configuration and customization: 42 45 * TracIni — Trac configuration file reference. 43 46 * TracPermissions — Access control and permissions. … … 45 48 * TracInterfaceCustomization — Customizing the Trac interface. 46 49 * TracLogging — The Trac logging facility. 47 * Administering the Version Control subsystem 50 * Administering the Version Control subsystem: 48 51 * TracRepositoryAdmin — Management of Source Code Repositories. 49 * Administering the Ticket subsystem 52 * Administering the Ticket subsystem: 50 53 * TracTicketsCustomFields — Expanding tickets with customized fields. 51 54 * TracNotification — Email notification. 52 55 * TracWorkflow — Configurable Ticket Workflow. 53 * Reference 54 * TracEnvironment — All you need to know about Trac environments 56 * Reference: 57 * TracEnvironment — All you need to know about Trac environments. 55 58 * TracAdmin — Administering a Trac project via the command-line. 56 59 57 == Support and Other Sources of Information ==60 == Support and Other Sources of Information 58 61 59 * [trac:TracFaq Trac FAQ] — A collection of Frequently Asked Questions (on the project website).60 * [trac:TracDev] and [trac:TracDev/ApiDocs API docs] — Trac Developer documentation 61 * TracSupport — How to get more information 62 * [trac:TracFaq Trac FAQ] — A collection of Frequently Asked Questions on the project website. 63 * [trac:TracDev] and [trac:TracDev/ApiDocs API docs] — Trac Developer documentation. 64 * TracSupport — How to get more information. 62 65 63 If you are looking for a good place to ask a question about Trac, look no further thanthe [trac:MailingList MailingList]. It provides a friendly environment to discuss openly among Trac users and developers.66 If you are looking for a good place to ask a question about Trac, see the [trac:MailingList MailingList]. It provides a friendly environment to discuss openly among Trac users and developers. -
wiki/pages/TracImport
r40558 r43921 1 = Importing ticket data = 2 [[PageOutline]] 1 = Importing ticket data 3 2 4 To migrate issue tickets from other issue-tracking systems or perform housekeeping actions on tickets or simply synchronize different databases, there are some tools, plug-ins and scripts available, which let you import or update tickets into Trac. 3 [[PageOutline(2-5,Contents,pullout)]] 5 4 6 == !TicketImportPlugin == 5 To migrate issue tickets from other issue-tracking systems into Trac or perform housekeeping actions on tickets or simply synchronize different databases, there are some tools, plugins and scripts available. 7 6 8 [http://trac-hacks.org/wiki/TicketImportPlugin TicketImportPlugin]: this plug-in lets you import or update into Trac a series of tickets from a '''CSV file''' or (if the [http://pypi.python.org/pypi/xlrd xlrd library] is installed) from an '''Excel spreadsheet'''. 7 == !TicketImportPlugin 9 8 10 == !ExportImportXlsPlugin == 9 [https://trac-hacks.org/wiki/TicketImportPlugin TicketImportPlugin]: a plugin that lets you import or update into Trac a series of tickets from a '''CSV file''' or (if the [https://pypi.python.org/pypi/xlrd xlrd library] is installed) from an '''Excel spreadsheet'''. 11 10 12 [http://trac-hacks.org/wiki/ExportImportXlsPlugin ExportImportXlsPlugin]: this plug-in adds an admin panel for exporting and importing tickets via '''XLS file'''. Requires the python packages xlwt/rxld. 11 == !ExportImportXlsPlugin 13 12 14 == Bugzilla == 13 [https://trac-hacks.org/wiki/ExportImportXlsPlugin ExportImportXlsPlugin]: a plugin that adds an admin panel for exporting and importing tickets via '''XLS file'''. Requires the python packages xlwt/rxld. 15 14 16 [http://trac-hacks.org/wiki/BugzillaIssueTrackingPlugin BugzillaIssueTrackingPlugin]: integrates Bugzilla issue data into Trac keeping TracLinks. Ticket data can be imported from Bugzilla using the [trac:browser:trunk/contrib/bugzilla2trac.py bugzilla2trac.py] script, available in the contrib/ directory of the Trac distribution. 15 == Bugzilla 16 17 [https://trac-hacks.org/wiki/BugzillaIssueTrackingPlugin BugzillaIssueTrackingPlugin]: a plugin that integrates Bugzilla issue data into Trac keeping TracLinks. Ticket data can be imported from Bugzilla using the [trac:browser:trunk/contrib/bugzilla2trac.py bugzilla2trac.py] script, available in the contrib/ directory of the Trac distribution. 17 18 18 19 {{{ … … 35 36 36 37 Currently, the following data is imported from Bugzilla: 37 38 39 40 38 * bugs 39 * bug activity (field changes) 40 * bug attachments 41 * user names and passwords (put into a htpasswd file) 41 42 42 43 The script provides a number of features to ease the conversion, such as: 43 44 45 * STATUS_KEYWORDS: Attach ticket keywords for the Bugzilla statuses not available in Trac. By default, the 'VERIFIED' and 'RELEASED'Bugzilla statuses are translated into Trac keywords.44 * PRODUCT_KEYWORDS: Trac has no concept of products, so the script provides the ability to attach a ticket keyword instead. 45 * IGNORE_COMMENTS: Don't import Bugzilla comments that match a certain regexp. 46 * STATUS_KEYWORDS: Attach ticket keywords for the Bugzilla statuses not available in Trac. By default, the `VERIFIED` and `RELEASED` Bugzilla statuses are translated into Trac keywords. 46 47 47 48 For more details on the available options, see the configuration section at the top of the script. 48 49 49 === Known Issues === 50 {{{ 51 #!comment 52 Don't merge this section in the default page 50 === Known Issues 51 {{{#!comment 52 Don't merge this section in the default page 53 53 }}} 54 54 [[TicketQuery(keywords=~bugzilla,status=!closed)]] … … 56 56 The adequate milestone for valid bugzilla2trac issue is usually ''Not applicable'', which means that fixes to the contributed script are not planned for a particular Trac release, but can happen anytime. 57 57 58 == Jira ==58 == Jira 59 59 60 [http ://trac-hacks.org/wiki/JiraToTracIntegration JiraToTracIntegration]: provides tools to import Atlassian Jira backup files into Trac. The plug-in consists of a Python 3.1 commandline tool that:61 62 - Sends the imported Jira data and attachments to Trac using the [http://trac-hacks.org/wiki/XmlRpcPluginXmlRpcPlugin].63 60 [https://trac-hacks.org/wiki/JiraToTracIntegration JiraToTracIntegration]: a plugin that provides tools to import Atlassian Jira backup files into Trac. The plugin consists of a Python 3.1 commandline tool that: 61 - Parses the Jira backup XML file. 62 - Sends the imported Jira data and attachments to Trac using the [th:XmlRpcPlugin]. 63 - Generates a htpasswd file containing the imported Jira users and their SHA-512 base64 encoded passwords. 64 64 65 == Mantis ==65 == Mantis 66 66 67 [http ://trac-hacks.org/wiki/MantisImportScript MantisImportScript]: script to import the followingdata from Mantis into Trac:68 69 70 71 * attachments (as long as the files live in the mantis db, not on the filesystem).67 [https://trac-hacks.org/wiki/MantisImportScript MantisImportScript]: a script to import the following type of data from Mantis into Trac: 68 * bugs 69 * bug comments 70 * bug activity (field changes) 71 * attachments (as long as the files live in the mantis database, not on the filesystem). 72 72 73 == !PlanetForge ==73 == !PlanetForge 74 74 75 [http ://trac-hacks.org/wiki/PlanetForgeImportExportPlugin PlanetForgeImportExportPlugin]: this plugin exports Trac data (wiki, tickets, compoments, permissions, repositories, etc.) using the open format designed by the COCLICOproject. It extends the webadmin panel and the 'trac admin ...' command. Has no 'import' feature.75 [https://trac-hacks.org/wiki/PlanetForgeImportExportPlugin PlanetForgeImportExportPlugin]: this plugin exports Trac data (wiki, tickets, compoments, permissions, repositories, etc.) using the open format designed by the [https://gforge.inria.fr/projects/coclico/ COCLICO] project. It extends the webadmin panel and the 'trac admin ...' command. Has no 'import' feature. 76 76 77 == Scarab ==77 == Scarab 78 78 79 [http ://trac-hacks.org/wiki/ScarabToTracScript ScarabToTracScript]: script that migrates Scarab issues to Trac tickets. Requires [http://trac-hacks.org/wiki/XmlRpcPlugin XmlRpcPlugin]79 [https://trac-hacks.org/wiki/ScarabToTracScript ScarabToTracScript]: a script that migrates Scarab issues to Trac tickets. Requires [th:XmlRpcPlugin]. 80 80 81 == Sourceforge ==81 == Sourceforge 82 82 83 [http ://trac-hacks.org/wiki/SfnToTracScript SfnToTracScript]: importer of !SourceForge's new backup file (originated from #Trac3521).83 [https://trac-hacks.org/wiki/SfnToTracScript SfnToTracScript]: importer of !SourceForge's new backup file (originated from #Trac3521). 84 84 Also, ticket data can be imported from Sourceforge using the [trac:browser:trunk/contrib/sourceforge2trac.py sourceforge2trac.py] script, available in the contrib/ directory of the Trac distribution. 85 85 86 == Other ==86 == Other 87 87 88 88 Since Trac uses a SQL database to store the data, you can also custom-import from other systems by examining the database tables. Just go into [http://www.sqlite.org/sqlite.html sqlite] command line to look at the tables and import them from your application. 89 89 90 === Comma delimited file - CSV === 91 See [trac:attachment:csv2trac.2.py:wiki:TracSynchronize csv2trac.2.py] for details. This approach is particularly useful if you need to enter a large number of tickets by hand. Note that the ticket type type field, (task etc...) is also needed for this script to work with more recent Trac releases. 90 === Comma delimited file - CSV 91 92 See [trac:attachment:csv2trac.2.py:wiki:TracSynchronize csv2trac.2.py] for details. This approach is particularly useful if you need to enter a large number of tickets by hand. Note that the ticket type type field, (task etc.) is also needed for this script to work with more recent Trac releases. 93 92 94 Comments on script: The script has an error on line 168: 'Ticket' needs to be 'ticket'. Also, the listed values for severity and priority are swapped. 93 95 -
wiki/pages/TracIni
r40558 r43921 2 2 3 3 [[TracGuideToc]] 4 [[PageOutline ]]4 [[PageOutline(2-5,Contents,pullout)]] 5 5 6 Trac is configured by editingthe **`trac.ini`** file, located in the `<projectenv>/conf` directory. The `trac.ini` configuration file and its parent directory should be writable by the web server.6 Trac is configured through the **`trac.ini`** file, located in the `<projectenv>/conf` directory. The `trac.ini` configuration file and its parent directory should be writable by the web server. 7 7 8 8 Trac monitors the timestamp of the file to trigger a complete environment reload and flush its caches when the timestamp changes. Most changes to the configuration will be reflected immediately, though changes to the `[components]` or `[logging]` sections will require restarting the web server. You may also need to restart the web server after creating a [#GlobalConfiguration global configuration] file when none was previously present. … … 17 17 Multiple files can be specified using a comma-separated list. 18 18 19 Note that you can also specify a global option file when creating a new project, by adding the option `--inherit=/path/to/global/trac.ini` to [TracAdmin#initenv trac-admin]'s `initenv` command.If you do not do this but nevertheless intend to use a global option file with your new environment, you will have to go through the newly generated `conf/trac.ini` file and delete the entries that will otherwise override those set in the global file.19 Note that you can also specify a global option file when creating a new project, by adding the option `--inherit=/path/to/global/trac.ini` to [TracAdmin#initenv trac-admin]'s `initenv` command. If you do not do this but nevertheless intend to use a global option file with your new environment, you will have to go through the newly generated `conf/trac.ini` file and delete the entries that will otherwise override those set in the global file. 20 20 21 21 There are two more entries in the [[#inherit-section| [inherit] ]] section, `templates_dir` for sharing global templates and `plugins_dir`, for sharing plugins. Those entries can themselves be specified in the shared configuration file, and in fact, configuration files can even be chained if you specify another `[inherit] file` there. -
wiki/pages/TracInstall
r40558 r43921 27 27 As you must be using Python 2.6 or 2.7, you already have the SQLite database bindings bundled with the standard distribution of Python (the `sqlite3` module). 28 28 29 Optionally, you may install a newer version of [ pypi:pysqlite pysqlite] than the one provided by the Python distribution. See [trac:PySqlite#ThePysqlite2bindings PySqlite] for details.29 Optionally, you may install a newer version of [http://pypi.python.org/pypi/pysqlite pysqlite] than the one provided by the Python distribution. See [trac:PySqlite#ThePysqlite2bindings PySqlite] for details. 30 30 31 31 ==== For the PostgreSQL database #ForPostgreSQL … … 108 108 The [TracAdmin trac-admin] command-line tool, used to create and maintain [TracEnvironment project environments], as well as the [TracStandalone tracd] standalone server are installed along with Trac. There are several methods for installing Trac. 109 109 110 It is assumed throughout this guide that you have elevated permissions as the `root` user or by prefixing commands with `sudo`. The umask `0002` should be used for a typical installation on a Unix-based platform. 111 110 112 === Using `easy_install` 111 113 Trac can be installed from PyPI or the Subversion repository using [http://pypi.python.org/pypi/setuptools setuptools]. … … 113 115 A few examples: 114 116 115 - Install Trac 1.0:116 117 easy_install Trac==1.0 118 117 - Install the latest stable version of Trac: 118 {{{#!sh 119 $ easy_install Trac 120 }}} 119 121 - Install latest development version: 120 121 easy_install Trac==dev 122 122 {{{#!sh 123 $ easy_install http://download.edgewall.org/trac/Trac-latest-dev.tar.gz 124 }}} 123 125 Note that in this case you won't have the possibility to run a localized version of Trac; 124 126 either use a released version or install from source 125 127 126 More information can be found on the [trac: setuptools] page.127 128 {{{#!div style="border: 1pt dotted; margin: 1em" 129 **Setuptools Warning:** If the version of your setuptools is in the range 5.4 through 5.6, the environment variable `PKG_RESOURCES_CACHE_ZIP_MANIFESTS` must be set in order to avoid significant performance degradation. More information may be found in the sections on [#RunningtheStandaloneServer Running The Standalone Server] and [#RunningTraconaWebServer Running Trac on a Web Server].128 More information can be found on the [trac:wiki:setuptools setuptools] page. 129 130 {{{#!div style="border: 1pt dotted; margin: 1em" 131 **Setuptools Warning:** If the version of your setuptools is in the range 5.4 through 5.6, the environment variable `PKG_RESOURCES_CACHE_ZIP_MANIFESTS` must be set in order to avoid significant performance degradation. More information may be found in [#DeployingTrac Deploying Trac]. 130 132 }}} 131 133 … … 236 238 == Deploying Trac 237 239 240 {{{#!div style="border: 1pt dotted; margin: 1em" 241 **Setuptools Warning:** If the version of your setuptools is in the range 5.4 through 5.6, the environment variable `PKG_RESOURCES_CACHE_ZIP_MANIFESTS` must be set in order to avoid significant performance degradation. 242 243 If running `tracd`, the environment variable can be set system-wide or for just the user that runs the `tracd` process. There are several ways to accomplish this in addition to what is discussed here, and depending on the distribution of your OS. 244 245 To be effective system-wide a shell script with the `export` statement may be added to `/etc/profile.d`. To be effective for a user session the `export` statement may be added to `~/.profile`. 246 {{{#!sh 247 export PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1 248 }}} 249 250 Alternatively, the variable can be set in the shell before executing `tracd`: 251 {{{#!sh 252 $ PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1 tracd --port 8000 /path/to/myproject 253 }}} 254 255 If running the Apache web server, !Ubuntu/Debian users should add the `export` statement to `/etc/apache2/envvars`. !RedHat/CentOS/Fedora should can add the `export` statement to `/etc/sysconfig/httpd`. 256 }}} 257 238 258 === Running the Standalone Server 239 259 … … 246 266 {{{#!sh 247 267 $ tracd -s --port 8000 /path/to/myproject 248 }}}249 250 {{{#!div style="border: 1pt dotted; margin: 1em"251 **Setuptools Warning:** If the version of your setuptools is in the range 5.4 through 5.6, the environment variable `PKG_RESOURCES_CACHE_ZIP_MANIFESTS` must be set in order to avoid significant performance degradation. The environment variable can be set system-wide, or for just the user that runs the `tracd` process. There are several ways to accomplish this in addition to what is discussed here, and depending on the distribution of your OS.252 253 To be effective system-wide a shell script with the `export` statement may be added to `/etc/profile.d`. To be effective for a user session the `export` statement may be added to `~/.profile`.254 {{{#!sh255 export PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1256 }}}257 258 Alternatively, the variable can be set in the shell before executing `tracd`:259 {{{#!sh260 $ PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1 tracd --port 8000 /path/to/myproject261 }}}262 268 }}} 263 269 … … 266 272 Trac provides various options for connecting to a "real" web server: 267 273 - [TracFastCgi FastCGI] 268 - [wiki:TracModWSGI mod_wsgi]269 - [TracModPython mod_python]274 - [wiki:TracModWSGI Apache with mod_wsgi] 275 - [TracModPython Apache with mod_python] 270 276 - //[TracCgi CGI] (should not be used, as the performance is far from optimal)// 271 277 … … 287 293 ==== Mapping Static Resources 288 294 289 Out of the box, Trac will pass static resources such as style sheets or images through itself. For anything but a tracd only based deployment, this is far from optimal as the web server could be set up to directly serve those static resources (for CGI setup, this is '''highly undesirable''' and will cause abysmal performance). 290 291 Web servers such as [http://httpd.apache.org/ Apache] allow you to create “Aliases” to resources, giving them a virtual URL that doesn't necessarily reflect the layout of the servers file system. We also can map requests for static resources directly to the directory on the file system, avoiding processing these requests by Trac itself. 292 293 There are two primary URL paths for static resources - `/chrome/common` and `/chrome/site`. Plugins can add their own resources, usually accessible by `/chrome/<plugin>` path, so its important to override only known paths and not try to make universal `/chrome` alias for everything. 294 295 Note that in order to get those static resources on the filesystem, you need first to extract the relevant resources from Trac using the TracAdmin `deploy` command: 295 Without additional configuration, Trac will handle requests for static resources such as stylesheets and images. For anything other than a TracStandalone deployment, this is not optimal as the web server can be set up to directly serve the static resources. For CGI setup, this is '''highly undesirable''' as it causes abysmal performance. 296 297 Web servers such as [http://httpd.apache.org/ Apache] allow you to create //Aliases// to resources, giving them a virtual URL that doesn't necessarily reflect their location on the file system. We can map requests for static resources directly to directories on the file system, to avoid Trac processing the requests. 298 299 There are two primary URL paths for static resources: `/chrome/common` and `/chrome/site`. Plugins can add their own resources, usually accessible at the `/chrome/<plugin>` path. 300 301 A single `/chrome` alias can used if the static resources are extracted for all plugins. This means that the `deploy` command must be executed after installing or updating a plugin that provides static resources, or after modifying resources in the `$env/htdocs` directory. This is probably appropriate for most installations but may not be what you want if, for example, you wish to upload plugins through the //Plugins// administration page. 302 303 The resources are extracted using the [TracAdmin trac-admin]` <environment> deploy` command: 296 304 [[TracAdminHelp(deploy)]] 297 305 298 The target `<directory>` will then contain an `htdocs` directory with: 299 - `site/` - a copy of the environment's directory `htdocs/` 300 - `common/` - the static resources of Trac itself 301 - `<plugins>/` - one directory for each resource directory managed by the plugins enabled for this environment 302 303 ===== Example: Apache and `ScriptAlias` #ScriptAlias-example 304 305 Assuming the deployment has been done this way: 306 {{{#!sh 307 $ trac-admin /var/trac/env deploy /path/to/shared/trac 308 }}} 309 310 Add the following snippet to Apache configuration ''before'' the `ScriptAlias` or `WSGIScriptAlias` (which map all the other requests to the Trac application), changing paths to match your deployment: 306 The target `<directory>` will contain an `htdocs` directory with: 307 - `common/` - the static resources of Trac 308 - `site/` - a copy of the environment's `htdocs/` directory 309 - `shared` - the static resources shared by multiple Trac environments, with a location defined by the `[inherit]` `htdocs_dir` option 310 - `<plugin>/` - one directory for each resource directory provided by the plugins enabled for this environment 311 312 The example that follows will create a single `/chrome` alias. If that isn't the correct approach for your installation you simply need to create more specific aliases: 311 313 {{{#!apache 312 314 Alias /trac/chrome/common /path/to/trac/htdocs/common 313 315 Alias /trac/chrome/site /path/to/trac/htdocs/site 316 Alias /trac/chrome/shared /path/to/trac/htdocs/shared 317 Alias /trac/chrome/<plugin> /path/to/trac/htdocs/<plugin> 318 }}} 319 320 ===== Example: Apache and `ScriptAlias` #ScriptAlias-example 321 322 Assuming the deployment has been done this way: 323 {{{#!sh 324 $ trac-admin /var/trac/env deploy /path/to/shared/trac 325 }}} 326 327 Add the following snippet to Apache configuration, changing paths to match your deployment. The snippet must be placed ''before'' the `ScriptAlias` or `WSGIScriptAlias` directive, because those directives map all requests to the Trac application: 328 {{{#!apache 329 Alias /trac/chrome /path/to/trac/htdocs 314 330 315 331 <Directory "/path/to/www/trac/htdocs"> 316 Order allow,deny 317 Allow from all 332 # For Apache 2.2 333 <IfModule !mod_authz_core.c> 334 Order allow,deny 335 Allow from all 336 </IfModule> 337 # For Apache 2.4 338 <IfModule mod_authz_core.c> 339 Require all granted 340 </IfModule> 318 341 </Directory> 319 342 }}} 320 343 321 If using mod_python, you might want to add this too (otherwise, the alias will be ignored):344 If using mod_python, add this too, otherwise the alias will be ignored: 322 345 {{{#!apache 323 <Location "/trac/chrome/common /">346 <Location "/trac/chrome/common"> 324 347 SetHandler None 325 348 </Location> 326 349 }}} 327 350 328 Note that we mapped the `/trac` part of the URL to the `trac.*cgi` script, and the path `/trac/chrome/common` is the path you have to append to that location to intercept requests to the static resources. 329 330 Similarly, if you have static resources in a project's `htdocs` directory (which is referenced by `/trac/chrome/site` URL in themes), you can configure Apache to serve those resources (again, put this ''before'' the `ScriptAlias` or `WSGIScriptAlias` for the .*cgi scripts, and adjust names and locations to match your installation): 351 Alternatively, if you wish to serve static resources directly from your project's `htdocs` directory rather than the location to which the files are extracted with the `deploy` command, you can configure Apache to serve those resources. Again, put this ''before'' the `ScriptAlias` or `WSGIScriptAlias` for the .*cgi scripts, and adjust names and locations to match your installation: 331 352 {{{#!apache 332 353 Alias /trac/chrome/site /path/to/projectenv/htdocs 333 354 334 355 <Directory "/path/to/projectenv/htdocs"> 335 Order allow,deny 336 Allow from all 356 # For Apache 2.2 357 <IfModule !mod_authz_core.c> 358 Order allow,deny 359 Allow from all 360 </IfModule> 361 # For Apache 2.4 362 <IfModule mod_authz_core.c> 363 Require all granted 364 </IfModule> 337 365 </Directory> 338 366 }}} 339 367 340 A lternatively to aliasing `/trac/chrome/common`, you can tell Trac togenerate direct links for those static resources (and only those), using the [[TracIni#trac-section| [trac] htdocs_location]] configuration setting:368 Another alternative to aliasing `/trac/chrome/common` is having Trac generate direct links for those static resources (and only those), using the [[TracIni#trac-section| [trac] htdocs_location]] configuration setting: 341 369 {{{#!ini 342 370 [trac] 343 371 htdocs_location = http://static.example.org/trac-common/ 344 372 }}} 345 Note that this makes it easy to have a dedicated domain serve those static resources (preferentially [http://code.google.com/speed/page-speed/docs/request.html#ServeFromCookielessDomain cookie-less]). 373 374 Note that this makes it easy to have a dedicated domain serve those static resources, preferentially cookie-less. 346 375 347 376 Of course, you still need to make the Trac `htdocs/common` directory available through the web server at the specified URL, for example by copying (or linking) the directory into the document root of the web server: -
wiki/pages/TracInterfaceCustomization
r40558 r43921 1 1 = Customizing the Trac Interface 2 2 [[TracGuideToc]] 3 [[PageOutline ]]3 [[PageOutline(2-5,Contents,pullout)]] 4 4 5 == Introduction6 5 This page gives suggestions on how to customize the look of Trac. Topics include editing the HTML templates and CSS files, but not the program code itself. The topics show users how they can modify the look of Trac to meet their specific needs. Suggestions for changes to Trac's interface applicable to all users should be filed as tickets, not listed on this page. 7 6 … … 11 10 The logo or icon image should be put in a folder named "htdocs" in your project's environment folder. ''Note: in projects created with a Trac version prior to 0.9 you will need to create this folder''. 12 11 13 12 '''Note''': you can actually put the logo and icon anywhere on your server (as long as it's accessible through the web server), and use their absolute or server-relative URLs in the configuration. 14 13 15 14 Now configure the appropriate section of your [wiki:TracIni trac.ini]: 16 15 17 16 === Logo 18 Change the `src` setting to `site/` followed by the name of your image file. The `width` and `height` settings should be modified to match your image's dimensions. The Trac chrome handler uses "`site/`" for files within the project directory `htdocs`, and "`common/`"for the common `htdocs` directory belonging to a Trac installation. Note that 'site/' is not a placeholder for your project name, it is the literal prefix that should be used. For example, if your project is named 'sandbox', and the image file is 'red_logo.gif' then the 'src' setting would be 'site/red_logo.gif', not 'sandbox/red_logo.gif'.17 Change the `src` setting to `site/` followed by the name of your image file. The `width` and `height` settings should be modified to match your image's dimensions. The Trac chrome handler uses `site/` for files within the project directory `htdocs`, and `common/` for the common `htdocs` directory belonging to a Trac installation. Note that 'site/' is not a placeholder for your project name, it is the literal prefix that should be used. For example, if your project is named 'sandbox', and the image file is 'red_logo.gif' then the 'src' setting would be 'site/red_logo.gif', not 'sandbox/red_logo.gif'. 19 18 20 19 {{{#!ini … … 49 48 See also TracNavigation for a more detailed explanation of the mainnav and metanav terms. 50 49 51 == Site Appearance ==#SiteAppearance50 == Site Appearance #SiteAppearance 52 51 53 52 Trac is using [http://genshi.edgewall.org Genshi] as the templating engine. Say you want to add a link to a custom stylesheet, and then your own header and footer. Save the following content as `site.html` inside your projects `templates/` directory (each Trac project can have their own `site.html`), eg `/path/to/env/templates/site.html`: … … 90 89 {{{#!xml 91 90 <form py:match="div[@id='content' and @class='ticket']/form" py:attrs="select('@*')"> 92 <py:if test="req. environ['PATH_INFO']== '/newticket' and (not 'preview' in req.args)">91 <py:if test="req.path_info == '/newticket' and (not 'preview' in req.args)"> 93 92 <p>Please make sure to search for existing tickets before reporting a new one!</p> 94 93 </py:if> … … 97 96 }}} 98 97 99 This example illustrates a technique of using `req. environ['PATH_INFO']` to limit scope of changes to one view only. For instance, to make changes in `site.html` only for timeline and avoid modifying other sections - use `req.environ['PATH_INFO']== '/timeline'` condition in `<py:if>` test.98 This example illustrates a technique of using `req.path_info` to limit scope of changes to one view only. For instance, to make changes in `site.html` only for timeline and avoid modifying other sections - use `req.path_info == '/timeline'` condition in `<py:if>` test. 100 99 101 100 More examples snippets for `site.html` can be found at [trac:wiki:CookBook/SiteHtml CookBook/SiteHtml]. … … 103 102 Example snippets for `style.css` can be found at [trac:wiki:CookBook/SiteStyleCss CookBook/SiteStyleCss]. 104 103 105 Note that the `site.html`, despite its name, can be put in a shared templates directory, see the [[TracIni#inherit-section|[inherit] templates_dir]] option. This could provide easier maintainence (and a migration path from 0.10 for larger installations)as one new global `site.html` file can be made to include any existing header, footer and newticket snippets.104 Note that the `site.html`, despite its name, can be put in a shared templates directory, see the [[TracIni#inherit-section|[inherit] templates_dir]] option. This could provide easier maintainence as one new global `site.html` file can be made to include any existing header, footer and newticket snippets. 106 105 107 == Project List ==#ProjectList106 == Project List #ProjectList 108 107 109 You can use a custom Genshi template to display the list of projects if you are using Trac with multiple projects. 108 You can use a custom Genshi template to display the list of projects if you are using Trac with multiple projects. 110 109 111 110 The following is the basic template used by Trac to display a list of links to the projects. For projects that could not be loaded, it displays an error message. You can use this as a starting point for your own index template: … … 136 135 }}} 137 136 138 Once you've created your custom template you will need to configure the webserver to tell Trac where the template is located (pls verify ... not yet changed to 0.11):137 Once you've created your custom template you will need to configure the webserver to tell Trac where the template is located: 139 138 140 139 For [wiki:TracModWSGI mod_wsgi]: … … 161 160 162 161 For [wiki:TracStandalone], you'll need to set up the `TRAC_ENV_INDEX_TEMPLATE` environment variable in the shell used to launch tracd: 163 - Unix 162 - Unix: 164 163 {{{#!sh 165 164 $ export TRAC_ENV_INDEX_TEMPLATE=/path/to/template 166 165 }}} 167 - Windows 166 - Windows: 168 167 {{{#!sh 169 168 $ set TRAC_ENV_INDEX_TEMPLATE=/path/to/template … … 172 171 == Project Templates 173 172 174 The appearance of each individual Trac environment, ie instance of a project, can be customized independently of other projects, even those hosted on the same server. The recommended way is to use a `site.html` template (see [#SiteAppearance]) whenever possible. Using `site.html` means changes are made to the original templates as they are rendered, and you should not normally need to redo modifications whenever Trac is upgraded. If you do make a copy of `theme.html` or any other Trac template, you need to migrate your modifiations to the newer version. If not, new Trac features or bug fixes may not work as expected.173 The appearance of each individual Trac environment, ie instance of a project, can be customized independently of other projects, even those hosted on the same server. The recommended way is to use a `site.html` template whenever possible, see [#SiteAppearance]. Using `site.html` means changes are made to the original templates as they are rendered, and you should not normally need to redo modifications whenever Trac is upgraded. If you do make a copy of `theme.html` or any other Trac template, you need to migrate your modifiations to the newer version. If not, new Trac features or bug fixes may not work as expected. 175 174 176 With that word of caution, any Trac template may be copied and customized. The default Trac templates are located inside the installed Trac egg (`/usr/lib/pythonVERSION/site-packages/Trac-VERSION.egg/trac/templates, .../trac/ticket/templates, .../trac/wiki/templates, ...`). The [#ProjectList] template file is called `index.html`, while the template responsible for main layout is called `theme.html`. Page assets such as images and CSS style sheets are located in the egg's `trac/htdocs` directory.175 With that word of caution, any Trac template may be copied and customized. The default Trac templates are located inside the installed Trac egg, such as `/usr/lib/pythonVERSION/site-packages/Trac-VERSION.egg/trac/templates, ../trac/ticket/templates, ../trac/wiki/templates`. The [#ProjectList] template file is called `index.html`, while the template responsible for main layout is called `theme.html`. Page assets such as images and CSS style sheets are located in the egg's `trac/htdocs` directory. 177 176 178 177 However, do not edit templates or site resources inside the Trac egg. Reinstalling Trac overwrites your modifications. Instead use one of these alternatives: -
wiki/pages/TracLinks
r40558 r43921 1 = Trac Links = 1 = Trac Links 2 2 3 [[TracGuideToc]] 3 4 TracLinks are a fundamental feature of Trac, because they allow easy hyperlinking between the various entities in the system—such as tickets, reports, changesets, Wiki pages, milestones, and source files—from anywhere WikiFormatting is used. 5 6 TracLinks are generally of the form '''type:id''' (where ''id'' represents the 7 number, name or path of the item) though some frequently used kinds of items 8 also have short-hand notations. 9 10 == Where to use TracLinks == 4 [[PageOutline(2-5,Contents,pullout)]] 5 6 TracLinks are a fundamental feature of Trac, because they allow easy hyperlinking between the various entities in the system — such as tickets, reports, changesets, Wiki pages, milestones, and source files — from anywhere where WikiFormatting is used. 7 8 TracLinks are generally of the form '''type:id''' (where ''id'' represents the number, name or path of the item) though some frequently used kinds of items also have short-hand notations. 9 10 == Where to use TracLinks 11 11 12 You can use TracLinks in: 12 13 … … 17 18 and any other text fields explicitly marked as supporting WikiFormatting. 18 19 19 == Overview ==20 == Overview 20 21 21 22 ||= Wiki Markup =||= Display =|| … … 51 52 }}} 52 53 53 '''Note:''' The wiki:CamelCase form is rarely used, but it can be convenient to refer to 54 pages whose names do not follow WikiPageNames rules, i.e., single words, 55 non-alphabetic characters, etc. See WikiPageNames for more about features specific 56 to links to Wiki page names. 54 '''Note:''' The wiki:CamelCase form is rarely used, but it can be convenient to refer to pages whose names do not follow WikiPageNames rules, ie single words, non-alphabetic characters, etc. See WikiPageNames for more about features specific to links to Wiki page names. 57 55 58 56 … … 105 103 TracLinks are a very simple idea, but actually allow quite a complex network of information. In practice, it's very intuitive and simple to use, and we've found the "link trail" extremely helpful to better understand what's happening in a project or why a particular change was made. 106 104 107 108 == Advanced use of TracLinks == 109 110 === Relative links === 105 == Advanced use of TracLinks 106 107 === Relative links 111 108 112 109 To create a link to a [trac:SubWiki SubWiki]-page just use a '/': … … 128 125 129 126 But in practice you often won't need to add the `../` prefix to link to a sibling page. 130 For resolving the location of a wiki link, it's the target page closest in the hierarchy 131 to the page where the link is written which will be selected. So for example, within 132 a sub-hierarchy, a sibling page will be targeted in preference to a toplevel page. 127 For resolving the location of a wiki link, it's the target page closest in the hierarchy to the page where the link is written which will be selected. So for example, within a sub-hierarchy, a sibling page will be targeted in preference to a toplevel page. 133 128 This makes it easy to copy or move pages to a sub-hierarchy by [[WikiNewPage#renaming|renaming]] without having to adapt the links. 134 129 135 In order to link explicitly to a [=#toplevel toplevel] Wiki page, 136 use the `wiki:/` prefix. Be careful **not** to use the `/` prefix alone, as this corresponds to the [#Server-relativelinks] syntax and with such a link you will lack the `/wiki/` part in the resulting URL. A link such as `[../newticket]` will stay in the wiki namespace and therefore link to a sibling page. 137 138 === Link anchors === 130 To link explicitly to a [=#toplevel toplevel] Wiki page, use the `wiki:/` prefix. Be careful **not** to use the `/` prefix alone, as this corresponds to the [#Server-relativelinks] syntax and with such a link you will lack the `/wiki/` part in the resulting URL. A link such as `[../newticket]` will stay in the wiki namespace and therefore link to a sibling page. 131 132 === Link anchors 139 133 140 134 To create a link to a specific anchor in a page, use '#': … … 180 174 [trac:source:trunk/trac/env.py#/ISystemInfoProvider ISystemInfoProvider] 181 175 182 === InterWiki links ===183 184 Other prefixes can be defined freely and made to point to resources in other Web applications. The definition of those prefixes as well as the URLs of the corresponding Web applications is defined in a special Wiki page, the InterMapTxt page. Note that while this could be used to create links to other Trac environments, there 's a more specialized way to register other Trac environments which offers greater flexibility.185 186 === InterTrac links ===176 === InterWiki links 177 178 Other prefixes can be defined freely and made to point to resources in other Web applications. The definition of those prefixes as well as the URLs of the corresponding Web applications is defined in a special Wiki page, the InterMapTxt page. Note that while this could be used to create links to other Trac environments, there is a more specialized way to register other Trac environments which offers greater flexibility. 179 180 === InterTrac links 187 181 188 182 This can be seen as a kind of InterWiki link specialized for targeting other Trac projects. … … 193 187 See InterTrac for the complete details. 194 188 195 === Server-relative links === 196 197 It is often useful to be able to link to objects in your project that 198 have no built-in Trac linking mechanism, such as static resources, `newticket`, 199 a shared `/register` page on the server, etc. 200 201 To link to resources inside the project, use either an absolute path from the project root, 202 or a relative link from the URL of the current page (''Changed in 0.11''): 189 === Server-relative links 190 191 It is often useful to be able to link to objects in your project that have no built-in Trac linking mechanism, such as static resources, `newticket`, a shared `/register` page on the server, etc. 192 193 To link to resources inside the project, use either an absolute path from the project root, or a relative link from the URL of the current page (''Changed in 0.11''): 203 194 204 195 {{{ … … 218 209 Display: [//register Register Here] or [[//register|Register Here]] 219 210 220 === Quoting space in TracLinks === 221 222 Immediately after a TracLinks prefix, targets containing space characters should 223 be enclosed in a pair of quotes or double quotes. 211 === Quoting space in TracLinks 212 213 Immediately after a TracLinks prefix, targets containing space characters should be enclosed in a pair of quotes or double quotes. 224 214 Examples: 225 215 * !wiki:"The whitespace convention" … … 232 222 * ![[attachment:the file.txt]] 233 223 234 === Escaping Links ===224 === Escaping Links 235 225 236 226 To prevent parsing of a !TracLink, you can escape it by preceding it with a '!' (exclamation mark). … … 244 234 ![42] is not a link either. 245 235 246 247 === Parameterized Trac links === 236 === Parameterized Trac links 248 237 249 238 Many Trac resources have more than one way to be rendered, depending on some extra parameters. For example, a Wiki page can accept a `version` or a `format` parameter, a report can make use of dynamic variables, etc. … … 255 244 - `[/newticket?summary=Add+short+description+here create a ticket with URL with spaces]` 256 245 257 258 == TracLinks Reference == 246 == TracLinks Reference 247 259 248 The following sections describe the individual link types in detail, as well as notes on advanced usage of links. 260 249 261 === attachment: links ===250 === attachment: links 262 251 263 252 The link syntax for attachments is as follows: … … 274 263 See also [#export:links]. 275 264 276 === comment: links ===265 === comment: links 277 266 278 267 When you're inside a given ticket, you can simply write e.g. !comment:3 to link to the third change comment. … … 285 274 - `ticket:123#comment:description` 286 275 287 === htdocs: links ===276 === htdocs: links 288 277 289 278 Use `htdocs:path/to/file` to reference files in the `htdocs` directory of the Trac environment, the [TracEnvironment#DirectoryStructure web resource directory]. 290 279 291 === query: links ===280 === query: links 292 281 293 282 See TracQuery#UsingTracLinks and [#ticket:links]. 294 283 295 === search: links ===284 === search: links 296 285 297 286 See TracSearch#SearchLinks 298 287 299 === ticket: links === 300 ''alias:'' `bug:` 288 === ticket: links 289 290 ''aliases:'' `bug:`, `issue:` 301 291 302 292 Besides the obvious `ticket:id` form, it is also possible to specify a list of tickets or even a range of tickets instead of the `id`. This generates a link to a custom query view containing this fixed set of tickets. … … 306 296 - `ticket:1,150` 307 297 308 === timeline: links ===298 === timeline: links 309 299 310 300 Links to the timeline can be created by specifying a date in the ISO:8601 format. The date can be optionally followed by a time specification. The time is interpreted as being UTC time, but if you don't want to compute the UTC time, you can specify a local time followed by your timezone offset relative to UTC. … … 318 308 - `timeline:2008-01-29T16:48+01:00` 319 309 320 === wiki: links ===310 === wiki: links 321 311 322 312 See WikiPageNames and [#QuotingspaceinTracLinks quoting space in TracLinks] above. It is possible to create a link to a specific page revision using the syntax WikiStart@1. 323 313 324 === Version Control related links ===325 326 It should be noted that multiple repository support works by creating a kind of virtual namespace for versioned files in which the toplevel folders correspond to the repository names. Therefore, in presence of multiple repositories, a ''/path'' specification in the syntax of links detailed below should start with the name of the repository. If omitted, the default repository is used. In case a toplevel folder of the default repository has the same name as a repository, the latter "wins". One can always access such folder by fully qualifying it (the default repository can be an alias of a named repository, or conversely, it is always possible to create an alias for the default repository, ask your Trac administrator).314 === Version Control related links 315 316 It should be noted that multiple repository support works by creating a kind of virtual namespace for versioned files in which the toplevel folders correspond to the repository names. Therefore, in presence of multiple repositories, a ''/path'' specification in the syntax of links detailed below should start with the name of the repository. If omitted, the default repository is used. In case a toplevel folder of the default repository has the same name as a repository, the latter "wins". One can always access such folder by fully qualifying it. The default repository can be an alias of a named repository, or conversely, it is always possible to create an alias for the default repository, ask your Trac administrator. 327 317 328 318 For example, `source:/trunk/COPYING` targets the path `/trunk/COPYING` in the default repository, whereas `source:/projectA/trunk/COPYING` targets the path `/trunk/COPYING` in the repository named `projectA`. This can be the same file if `'projectA'` is an alias to the default repository or if `''` (the default repository) is an alias to `'projectA'`. 329 319 330 ==== source: links ==== 320 ==== source: links 321 331 322 ''aliases:'' `browser:`, `repos:` 332 323 333 The default behavior for a `source:/some/path link` is to open the browser in that directory directory 334 if the path points to a directory or to show the latest content of the file. 324 The default behavior for a `source:/some/path link` is to open the browser in that directory directory if the path points to a directory or to show the latest content of the file. 335 325 336 326 It's also possible to link directly to a specific revision of a file like this: 337 327 - `source:/some/file@123` - link to the file's revision 123 338 328 - `source:/some/file@head` - link explicitly to the latest revision of the file 329 - `source:/some/file@named-branch` - link to latest revision of the specified file in `named-branch` (DVCS such as Git or Mercurial) 339 330 340 331 If the revision is specified, one can even link to a specific line number: 341 332 - `source:/some/file@123#L10` 342 333 - `source:/tag/0.10@head#L10` 334 - `source:/some/file@named-branch#L10` 343 335 344 336 Finally, one can also highlight an arbitrary set of lines: 345 337 - `source:/some/file@123:10-20,100,103#L99` - highlight lines 10 to 20, and lines 100 and 103, and target line 99 346 - or without version number (the `@` is still needed): `source:/some/file@:10-20,100,103#L99`. Version can be omitted when the path is pointing to a source file that will no longer change (like `source:/tags/...`), otherwise it's better to specify which lines of //which version// of the file you're talking about 338 - or without version number (the `@` is still needed): `source:/some/file@:10-20,100,103#L99`. Version can be omitted when the path is pointing to a source file that will no longer change (like `source:/tags/...`), otherwise it's better to specify which lines of //which version// of the file you're talking about. 347 339 348 340 Note that in presence of multiple repositories, the name of the repository is simply integrated in the path you specify for `source:` (e.g. `source:reponame/trunk/README`). ''(since 0.12)'' 349 341 350 ==== export: links ====342 ==== export: links 351 343 352 344 To force the download of a file in the repository, as opposed to displaying it in the browser, use the `export` link. Several forms are available: … … 354 346 * `export:123:/some/file` - get revision 123 of the specified file 355 347 * `export:/some/file@123` - get revision 123 of the specified file 348 * `export:/some/file@named-branch` - get latest revision of the specified file in `named-branch` (DVCS such as Git or Mercurial). 356 349 357 350 This can be very useful for displaying XML or HTML documentation with correct stylesheets and images, in case that has been checked in into the repository. Note that for this use case, you'd have to allow the web browser to render the content by setting `[browser] render_unsafe_content = yes` (see TracIni#browser-section), otherwise Trac will force the files to be downloaded as attachments for security concerns. … … 359 352 If the path is to a directory in the repository instead of a specific file, the source browser will be used to display the directory (identical to the result of `source:/some/dir`). 360 353 361 ==== log: links ====354 ==== log: links 362 355 363 356 The `log:` links are used to display revision ranges. In its simplest form, it can link to the latest revisions of the specified path, but it can also support displaying an arbitrary set of revisions. … … 367 360 - `log:@20788,20791:20795` - list revision 20788 and the revisions from 20791 to 20795 368 361 - `log:/trunk/tools@20788,20791:20795` - list revision 20788 and the revisions from 20791 to 20795 which affect the given path 362 - `log:/tools@named-branch` - the revisions in `tools` starting from the latest revision in `named-branch` (DVCS such as Git or Mercurial) 369 363 370 364 There are short forms for revision ranges as well: … … 379 373 ---- 380 374 See also: WikiFormatting, TracWiki, WikiPageNames, InterTrac, InterWiki 381 -
wiki/pages/TracModPython
r40558 r43921 6 6 Trac supports [http://www.modpython.org/ mod_python], which speeds up Trac's response times considerably, especially compared to [TracCgi CGI], and permits use of many Apache features not possible with [wiki:TracStandalone tracd]/mod_proxy. 7 7 8 These instructions are for Apache 2. If you are using Apache 1.3, you may have some luck with [trac:wiki:TracModPython2.7 TracModPython2.7], but that is a deprecated setup.9 10 8 [[PageOutline(2-3,Overview,inline)]] 11 9 12 == Simple configuration: single project ==#Simpleconfiguration10 == Simple configuration: single project #Simpleconfiguration 13 11 14 12 If you just installed mod_python, you may have to add a line to load the module in the Apache configuration: … … 37 35 {{{#!apache 38 36 <Location /mpinfo> 39 SetHandler mod_python 40 PythonInterpreter main_interpreter 41 PythonHandler mod_python.testhandler 42 Order allow,deny 43 Allow from all 37 SetHandler mod_python 38 PythonInterpreter main_interpreter 39 PythonHandler mod_python.testhandler 40 # For Apache 2.2 41 <IfModule !mod_authz_core.c> 42 Order allow,deny 43 Allow from all 44 </IfModule> 45 # For Apache 2.4 46 <IfModule mod_authz_core.c> 47 Require all granted 48 </IfModule> 44 49 </Location> 45 50 }}} … … 48 53 {{{#!apache 49 54 <Location /projects/myproject> 50 SetHandler mod_python 51 PythonInterpreter main_interpreter 52 PythonHandler trac.web.modpython_frontend 53 PythonOption TracEnv /var/trac/myproject 54 PythonOption TracUriRoot /projects/myproject 55 Order allow,deny 56 Allow from all 55 SetHandler mod_python 56 PythonInterpreter main_interpreter 57 PythonHandler trac.web.modpython_frontend 58 PythonOption TracEnv /var/trac/myproject 59 PythonOption TracUriRoot /projects/myproject 60 # For Apache 2.2 61 <IfModule !mod_authz_core.c> 62 Order allow,deny 63 Allow from all 64 </IfModule> 65 # For Apache 2.4 66 <IfModule mod_authz_core.c> 67 Require all granted 68 </IfModule> 57 69 </Location> 58 70 }}} … … 348 360 '''Note''': For the above configuration to have any effect it must be put after the configuration of your project root location, ie {{{<Location /myproject />}}}. 349 361 350 Also, setting `PythonOptimize On` seems to mess up the page headers and footers, in addition to hiding the documentation for macros and plugins (see #Trac8956). Considering how little effect the option has, leave it `Off`.362 **Note:** Do not enable python optimizations using the directive `PythonOptimize On`. When optimizations are enabled the page header/footer and documentation for macros and plugins will be hidden. An error will be raised in Trac 1.0.11 and later when optimizations are enabled. 351 363 352 364 === HTTPS issues -
wiki/pages/TracModWSGI
r40558 r43921 7 7 == The `trac.wsgi` script 8 8 9 Trac can be run on top of mod_wsgi with the help of an application script, which is justa Python file saved with a `.wsgi` extension.9 Trac can be run on top of mod_wsgi with the help of an application script, which is a Python file saved with a `.wsgi` extension. 10 10 11 11 A robust and generic version of this file can be created using the `trac-admin <env> deploy <dir>` command which automatically substitutes the required paths, see TracInstall#cgi-bin. The script should be sufficient for most installations and users not wanting more information can proceed to [#Mappingrequeststothescript configuring Apache]. … … 14 14 {{{#!python 15 15 def application(environ, start_request): 16 # Add this to config when you have multiple projects 16 # Add this to config when you have multiple projects 17 17 environ.setdefault('trac.env_parent_dir', '/usr/share/trac/projects') 18 18 .. … … 20 20 21 21 === A very basic script 22 22 23 In its simplest form, the script could be: 23 24 … … 80 81 <Directory /usr/local/trac/mysite/apache> 81 82 WSGIApplicationGroup %{GLOBAL} 82 Order deny,allow 83 Allow from all 83 # For Apache 2.2 84 <IfModule !mod_authz_core.c> 85 Order deny,allow 86 Allow from all 87 </IfModule> 88 # For Apache 2.4 89 <IfModule mod_authz_core.c> 90 Require all granted 91 </IfModule> 84 92 </Directory> 85 93 }}} … … 94 102 <Directory /usr/share/trac/cgi-bin> 95 103 WSGIApplicationGroup %{GLOBAL} 96 Order deny,allow 97 Allow from all 104 # For Apache 2.2 105 <IfModule !mod_authz_core.c> 106 Order deny,allow 107 Allow from all 108 </IfModule> 109 # For Apache 2.4 110 <IfModule mod_authz_core.c> 111 Require all granted 112 </IfModule> 98 113 </Directory> 99 114 }}} … … 101 116 In order to let Apache run the script, access to the directory in which the script resides is opened up to all of Apache. Additionally, the `WSGIApplicationGroup` directive ensures that Trac is always run in the first Python interpreter created by mod_wsgi. This is necessary because the Subversion Python bindings, which are used by Trac, don't always work in other sub-interpreters and may cause requests to hang or cause Apache to crash. After adding this configuration, restart Apache, and then it should work. 102 117 103 To test the setup of Apache, mod_wsgi and Python itself (ie .without involving Trac and dependencies), this simple wsgi application can be used to make sure that requests gets served (use as only content in your `.wsgi` script):118 To test the setup of Apache, mod_wsgi and Python itself (ie without involving Trac and dependencies), this simple wsgi application can be used to make sure that requests gets served (use as only content in your `.wsgi` script): 104 119 105 120 {{{#!python … … 109 124 }}} 110 125 111 For more information about using the mod_wsgi specific directives, see the [http ://code.google.com/p/modwsgi/wiki/ mod_wsgi's wiki] and more specifically the [http://code.google.com/p/modwsgi/wiki/IntegrationWithTracIntegrationWithTrac] page.126 For more information about using the mod_wsgi specific directives, see the [https://code.google.com/archive/p/modwsgi/wikis mod_wsgi's wiki] and more specifically the [https://code.google.com/archive/p/modwsgi/wikis/IntegrationWithTrac.wiki IntegrationWithTrac] page. 112 127 113 128 == Configuring Authentication 114 129 115 The following sections describe different methods for setting up authentication. See also [http://httpd.apache.org/docs/2. 2/howto/auth.html Authentication, Authorization and Access Control] in the Apache guide.130 The following sections describe different methods for setting up authentication. See also [http://httpd.apache.org/docs/2.4/howto/auth.html Authentication, Authorization and Access Control] in the Apache guide. 116 131 117 132 === Using Basic Authentication … … 133 148 }}} 134 149 135 ''See the man page for `htpasswd` for full documentation.'' 150 See the man page for `htpasswd` for full documentation. 136 151 137 152 After you've created the users, you can set their permissions using TracPermissions. … … 156 171 </LocationMatch> 157 172 }}} 158 Note that neither a file nor a directory named 'login' needs to exist.[[BR]] 159 See also the [http://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html mod_auth_basic] documentation.173 174 Note that neither a file nor a directory named 'login' needs to exist. See also the [https://httpd.apache.org/docs/2.4/mod/mod_auth_basic.html mod_auth_basic] documentation. 160 175 161 176 === Using Digest Authentication 162 177 163 For better security, it is recommended that you either enable SSL or at least use the “digest” authentication scheme instead of “Basic”.178 For better security, it is recommended that you either enable SSL or at least use the "digest" authentication scheme instead of "Basic". 164 179 165 180 You have to create your `.htpasswd` file with the `htdigest` command instead of `htpasswd`, as follows: … … 182 197 For multiple environments, you can use the same `LocationMatch` as described with the previous method. 183 198 184 '''Note : `Location` cannot be used inside .htaccess files, but must instead live within the main httpd.conf file. If you are on a shared server, you therefore will not be able to provide this level of granularity. '''199 '''Note''': `Location` cannot be used inside .htaccess files, but must instead live within the main httpd.conf file. If you are on a shared server, you therefore will not be able to provide this level of granularity. 185 200 186 201 Don't forget to activate the mod_auth_digest. For example, on a Debian 4.0r1 (etch) system: … … 189 204 }}} 190 205 191 See also the [http ://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html mod_auth_digest] documentation.206 See also the [https://httpd.apache.org/docs/2.4/mod/mod_auth_basic.html mod_auth_digest] documentation. 192 207 193 208 === Using LDAP Authentication 194 209 195 Configuration for [http ://httpd.apache.org/docs/2.2/mod/mod_ldap.html mod_ldap] authentication in Apache is more involved (httpd 2.2.xand OpenLDAP: slapd 2.3.19).210 Configuration for [https://httpd.apache.org/docs/2.4/mod/mod_ldap.html mod_ldap] authentication in Apache is more involved (httpd 2.2+ and OpenLDAP: slapd 2.3.19). 196 211 197 212 1. You need to load the following modules in Apache httpd.conf: … … 219 234 AuthLDAPURL "ldap://directory.example.com:3268/DC=example,DC=com?sAMAccountName?sub?(objectClass=user)" 220 235 }}} 221 You will also need to provide an account for Apache to use when checking credentials. As this password will be listed in plain text in the config, you need to use an account specifically for this task:236 You will also need to provide an account for Apache to use when checking credentials. As this password will be listed in plain text in the configuration, you need to use an account specifically for this task: 222 237 {{{#!apache 223 238 AuthLDAPBindDN ldap-auth-user@example.com … … 251 266 252 267 See also: 253 - [http ://httpd.apache.org/docs/2.2/mod/mod_authnz_ldap.html mod_authnz_ldap], documentation for mod_authnz_ldap.254 - [http ://httpd.apache.org/docs/2.2/mod/mod_ldap.html mod_ldap], documentation for mod_ldap, which provides connection pooling and a shared cache.255 - [http ://trac-hacks.org/wiki/LdapPlugin TracHacks:LdapPlugin] for storing TracPermissions in LDAP.268 - [https://httpd.apache.org/docs/2.4/mod/mod_authnz_ldap.html mod_authnz_ldap], documentation for mod_authnz_ldap. 269 - [https://httpd.apache.org/docs/2.4/mod/mod_ldap.html mod_ldap], documentation for mod_ldap, which provides connection pooling and a shared cache. 270 - [https://trac-hacks.org/wiki/LdapPlugin TracHacks:LdapPlugin] for storing TracPermissions in LDAP. 256 271 257 272 === Using SSPI Authentication … … 278 293 See also [trac:TracOnWindows/Advanced]. 279 294 280 === Using Apache authentication with the Account Manager plugin's Login form === 281 282 To begin with, see the basic instructions for using the Account Manager plugin's [http://trac-hacks.org/wiki/AccountManagerPlugin/Modules#LoginModule Login module] and its [http://trac-hacks.org/wiki/AccountManagerPlugin/AuthStores#HttpAuthStore HttpAuthStore authentication module]. 283 284 '''Note:''' If is difficult to get !HttpAuthStore to work with WSGI when using any Account Manager version prior to acct_mgr-0.4. Upgrading is recommended. 285 286 Here is an example (from the !HttpAuthStore link) using acct_mgr-0.4 for hosting a single project: 287 {{{#!ini 288 [components] 289 ; be sure to enable the component 290 acct_mgr.http.HttpAuthStore = enabled 291 292 [account-manager] 293 ; configure the plugin to use a page that is secured with http authentication 294 authentication_url = /authFile 295 password_store = HttpAuthStore 296 }}} 297 This will generally be matched with an Apache config like: 298 {{{#!apache 299 <Location /authFile> 300 …HTTP authentication configuration… 301 Require valid-user 302 </Location> 303 }}} 304 Note that '''authFile''' need not exist (unless you are using Account Manager older than 0.4). See the !HttpAuthStore link above for examples where multiple Trac projects are hosted on a server. 295 === Using CA !SiteMinder Authentication 296 297 Setup CA !SiteMinder to protect your Trac login URL, for example `/trac/login`. Also, make sure the policy is set to include the HTTP_REMOTE_USER variable. If your site allows it, you can set this in `LocalConfig.conf`: 298 {{{#!apache 299 RemoteUserVar="WHATEVER_IT_SHOULD_BE" 300 SetRemoteUser="YES" 301 }}} 302 303 The specific variable is site-dependent. Ask your site administrator. If your site does not allow the use of `LocalConfig.conf` for security reasons, have your site administrator set the policy on the server to set REMOTE_USER. 304 305 Also add a !LogOffUri parameter to the agent configuration, for example `/trac/logout`. 306 307 Then modify the trac.wsgi script generated using `trac-admin <env> deploy <dir>` to add the following lines, which extract the `HTTP_REMOTE_USER` variable and set it to `REMOTE_USER`: 308 309 {{{#!python 310 def application(environ, start_request): 311 # Set authenticated username on CA SiteMinder to REMOTE_USER variable 312 # strip() is used to remove any spaces on the end of the string 313 if 'HTTP_SM_USER' in environ: 314 environ['REMOTE_USER'] = environ['HTTP_REMOTE_USER'].strip() 315 ... 316 }}} 317 318 You do not need any Apache "Location" directives. 305 319 306 320 === Example: Apache/mod_wsgi with Basic Authentication, Trac being at the root of a virtual host … … 310 324 - uses Apache basic authentication for Trac authentication. 311 325 312 If you want your Trac to be served from e .g. !http://trac.my-proj.my-site.org, then from the folder e.g.`/home/trac-for-my-proj`, if you used the command `trac-admin the-env initenv` to create a folder `the-env`, and you used `trac-admin the-env deploy the-deploy` to create a folder `the-deploy`, then first:326 If you want your Trac to be served from eg !http://trac.my-proj.my-site.org, then from the folder eg `/home/trac-for-my-proj`, if you used the command `trac-admin the-env initenv` to create a folder `the-env`, and you used `trac-admin the-env deploy the-deploy` to create a folder `the-deploy`, then first: 313 327 314 328 Create the htpasswd file: … … 319 333 htpasswd htpasswd seconduser 320 334 }}} 335 321 336 Keep the file above your document root for security reasons. 322 337 323 Create this file e.g. (ubuntu) `/etc/apache2/sites-enabled/trac.my-proj.my-site.org.conf`with the following content:338 Create this file for example `/etc/apache2/sites-enabled/trac.my-proj.my-site.org.conf` on Ubuntu with the following content: 324 339 325 340 {{{#!apache … … 344 359 }}} 345 360 346 Note: for subdomains to work you would probably also need to alter `/etc/hosts` and add A-Records to your host's DNS.361 For subdomains to work you would probably also need to alter `/etc/hosts` and add A-Records to your host's DNS. 347 362 348 363 == Troubleshooting … … 350 365 === Use a recent version 351 366 352 Please use either version 1.6, 2.4 or later of `mod_wsgi`. Versions prior to 2.4 in the 2.X branch have problems with some Apache configurations that use WSGI file wrapper extension. This extension is used in Trac to serve up attachments and static media files such as style sheets. If you are affected by this problem, attachments will appear to be empty and formatting of HTML pages will appear not to work due to style sheet files not loading properly. Another frequent symptom is that binary attachment downloads are truncated. See mod_wsgi tickets [http ://code.google.com/p/modwsgi/issues/detail?id=100 #100] and [http://code.google.com/p/modwsgi/issues/detail?id=132 #132].353 354 '' Note: using mod_wsgi 2.5 and Python 2.6.1 gave an Internal Server Error on my system (Apache 2.2.11 and Trac 0.11.2.1). Upgrading to Python 2.6.2 (as suggested [http://www.mail-archive.com/modwsgi@googlegroups.com/msg01917.html here]) solved this for me[[BR]]-- Graham Shanks''367 Please use either version 1.6, 2.4 or later of `mod_wsgi`. Versions prior to 2.4 in the 2.X branch have problems with some Apache configurations that use WSGI file wrapper extension. This extension is used in Trac to serve up attachments and static media files such as style sheets. If you are affected by this problem, attachments will appear to be empty and formatting of HTML pages will appear not to work due to style sheet files not loading properly. Another frequent symptom is that binary attachment downloads are truncated. See mod_wsgi tickets [https://code.google.com/archive/p/modwsgi/issues/100 #100] and [https://code.google.com/archive/p/modwsgi/issues/132 #132]. 368 369 '''Note''': using mod_wsgi 2.5 and Python 2.6.1 gave an Internal Server Error on my system (Apache 2.2.11 and Trac 0.11.2.1). Upgrading to Python 2.6.2 (as suggested [http://www.mail-archive.com/modwsgi@googlegroups.com/msg01917.html here]) solved this for me[[BR]]-- Graham Shanks 355 370 356 371 If you plan to use `mod_wsgi` in embedded mode on Windows or with the MPM worker on Linux, then you will need version 3.4 or greater. See [trac:#10675] for details. … … 358 373 === Getting Trac to work nicely with SSPI and 'Require Group' 359 374 360 If you have set Trac up on Apache, Win32 and configured SSPI, but added a 'Require group' option to your apache configuration, then the SSPIOmitDomain option is probably not working. If it is not working, your usernames in Trac probably look like 'DOMAIN\user' rather than 'user'.361 362 This WSGI script 'fixes'that:375 If you have set Trac up on Apache, Win32 and configured SSPI, but added a 'Require group' option to your Apache configuration, then the SSPIOmitDomain option is probably not working. If it is not working, your usernames in Trac probably look like 'DOMAIN\user' rather than 'user'. 376 377 This WSGI script fixes that: 363 378 {{{#!python 364 379 import os … … 396 411 Now Trac drops the connection after serving a page and the connection count on the database will be kept low. 397 412 398 //This is not a recommended approach though. See also the notes at the bottom of the [http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac mod_wsgi's IntegrationWithTrac] wiki page.// 413 //This is not a recommended approach though. See also the notes at the bottom of the [https://code.google.com/archive/p/modwsgi/wikis/IntegrationWithTrac.wiki mod_wsgi's IntegrationWithTrac] wiki page.// 414 415 === Missing Headers and Footers 416 417 If python optimizations are enabled, then headers and footers will not be rendered. An error will be raised in Trac 1.0.11 and later when optimizations are enabled. 418 419 In your WSGI configuration file, the `WSGIPythonOptimize` setting must be set to `0` (`1` or `2` will not work): 420 421 {{{#!apache 422 WSGIPythonOptimize 0 423 }}} 424 425 On Ubuntu, the WSGI mod configuration is at `/etc/apache2/mods-enabled/wsgi.conf`. 426 427 The same issue is seen with `PythonOptimize On` in [TracModPython#Pagelayoutissues ModPython]. 399 428 400 429 === Other resources 401 430 402 For more troubleshooting tips, see also the [TracModPython#Troubleshooting mod_python troubleshooting] section, as most Apache-related issues are quite similar, plus discussion of potential [http ://code.google.com/p/modwsgi/wiki/ApplicationIssues application issues] when using mod_wsgi. The wsgi page also has a [http://code.google.com/p/modwsgi/wiki/IntegrationWithTracIntegration With Trac] document.431 For more troubleshooting tips, see also the [TracModPython#Troubleshooting mod_python troubleshooting] section, as most Apache-related issues are quite similar, plus discussion of potential [https://code.google.com/archive/p/modwsgi/wikis/ApplicationIssues.wiki application issues] when using mod_wsgi. The wsgi page also has a [https://code.google.com/archive/p/modwsgi/wikis/IntegrationWithTrac.wiki Integration With Trac] document. 403 432 404 433 ---- -
wiki/pages/TracPlugins
r40558 r43921 9 9 From the user's point of view, a plugin is either a standalone .py file or an .egg package. Trac looks for plugins in Python's `site-packages` directory, the [TracIni#GlobalConfiguration global shared] `plugins` directory and the [TracEnvironment project environment] `plugins` directory. Components defined in globally-installed plugins must be explicitly enabled in the [[TracIni#components-section| [components] ]] section of the `trac.ini` file. Components defined in the `plugins` directory of the project environment are enabled, unless explicitly disabled in the `[components]` section of the `trac.ini` file. 10 10 11 == Requirements for Trac eggs 11 == Requirements for Trac eggs #Requirements 12 12 13 13 To use egg-based plugins in Trac, you need to have [http://peak.telecommunity.com/DevCenter/setuptools setuptools] (version >= 0.6) installed. … … 25 25 == Installing a Trac plugin 26 26 27 The instructions below are applicable to a plugin packaged as an egg. Plugins implemented as a single `py` file should be downloaded and copied to the [TracEnvironment project environment] `plugins` directory or the [TracIni#GlobalConfiguration global shared] plugins directory. 28 27 29 === For a single project 28 29 Plugins are typically packaged as [http://peak.telecommunity.com/DevCenter/PythonEggs Python eggs]. That means they are .zip archives with the file extension `.egg`.30 30 31 31 If you have downloaded a source distribution of a plugin, and want to build the `.egg` file: … … 51 51 ==== With an .egg file 52 52 53 Some plugins, such as [ trac:SpamFilter SpamFilter], are downloadable as an `.egg` file that can be installed with `easy_install` or `pip`:54 {{{#!sh 55 $ easy_install Trac SpamFilter56 $ pip install Trac SpamFilter53 Some plugins, such as [https://trac-hacks.org/wiki/TagsPlugin TracTags], are downloadable as an `.egg` file that can be installed with `easy_install` or `pip`: 54 {{{#!sh 55 $ easy_install TracTags 56 $ pip install TracTags 57 57 }}} 58 58 … … 63 63 If Trac reports permission errors after installing a zipped egg, and you would rather not bother providing an egg cache directory writable by the web server, you can get around it by simply unzipping the egg. Just pass `--always-unzip` to `easy_install`: 64 64 {{{#!sh 65 $ easy_install --always-unzip Trac SpamFilter-0.4.1_r10106-py2.6.egg65 $ easy_install --always-unzip TracTags 66 66 }}} 67 67 You should end up with a directory having the same name as the zipped egg, complete with `.egg` extension, and containing its uncompressed contents. … … 73 73 `easy_install` makes installing from source a snap. Just give it the URL to either a Subversion repository or a tarball/zip of the source: 74 74 {{{#!sh 75 $ easy_install http ://svn.edgewall.com/repos/trac/plugins/0.12/spam-filter-captcha75 $ easy_install https://trac-hacks.org/svn/tagsplugin/trunk 76 76 }}} 77 77 … … 83 83 {{{#!ini 84 84 [components] 85 trac spamfilter.* = enabled85 tractags.* = enabled 86 86 }}} 87 87 … … 89 89 90 90 After installing the plugin, you must restart your web server. 91 92 ==== Upgrading the environment 93 94 Some plugins may require an environment upgrade. This will typically be necessary for plugins that implement `IEnvironmentSetupParticipant`. Common reasons for requiring an environment upgrade are to add tables to the database or add configuration parameters to trac.ini. A notification will be displayed when accessing Trac for the first time after installing a plugin and restarting the web server. To upgrade the environment, run the command: 95 96 {{{#!sh 97 $ trac-admin /path/to/env upgrade 98 }}} 99 100 A database backup will be made before upgrading the environment, unless the `--no-backup` option is specified. For more information, refer to the documentation output by `trac-admin /path/to/env help upgrade`. 91 101 92 102 ==== Uninstalling -
wiki/pages/TracQuery
r40558 r43921 18 18 19 19 After you have edited your filters, click the ''Update'' button to refresh your results. 20 21 Some shortcuts can be used to manipulate //checkbox// filters. 22 * Clicking on a filter row label toggles all checkboxes. 23 * Pressing the modifier key while clicking on a filter row label inverts the state of all checkboxes. 24 * Pressing the modifier key while clicking on a checkbox selects the checkbox and deselects all other checkboxes in the filter. 25 26 The modifier key is platform and browser dependent. On Mac the modified key is !Option/Alt or Command. On Linux the modifier key is Ctrl + Alt. Opera on Windows seems to use Ctrl + Alt, while Alt is effective for other Windows browsers. 20 27 21 28 == Navigating Tickets -
wiki/pages/TracRoadmap
r40558 r43921 18 18 With appropriate permissions it is possible to add, modify and remove milestones using either the web interface (roadmap and milestone pages), web administration interface or by using `trac-admin`. 19 19 20 '''Note:''' Milestone descriptions can not currently be edited using 'trac-admin'.20 '''Note:''' Milestone descriptions can not currently be edited using `trac-admin`. 21 21 22 22 == iCalendar Support 23 23 24 The Roadmap supports the [http://www.ietf.org/rfc/rfc2445.txt iCalendar] format to keep track of planned milestones and related tickets from your favorite calendar software. Many calendar applications support the iCalendar specification including 25 * [http://www.apple.com/ical/ Apple iCal] for Mac OS X 26 * the cross-platform [http://www.mozilla.org/projects/calendar/ Mozilla Calendar]27 * [http:// chandlerproject.org Chandler]28 * [http ://kontact.kde.org/korganizer/ Korganizer], the calendar application of the [http://www.kde.org/ KDE] project29 * [http s://wiki.gnome.org/Apps/Evolution Evolution]30 * [http ://office.microsoft.com/en-us/outlook/ Microsoft Outlook] can also read iCalendar files and appears as a new static calendar in Outlook31 * [http s://www.google.com/calendar/ Google Calendar]24 The Roadmap supports the [http://www.ietf.org/rfc/rfc2445.txt iCalendar] format to keep track of planned milestones and related tickets from your favorite calendar software. Many calendar applications support the iCalendar specification including: 25 * [http://www.apple.com/ical/ Apple iCal] for Mac OS X. 26 * [http://www.mozilla.org/projects/calendar/ Mozilla Calendar], cross-platform. 27 * [http://kontact.kde.org/korganizer/ Korganizer], the calendar application of the [http://www.kde.org/ KDE] project. 28 * [https://wiki.gnome.org/Apps/Evolution Evolution], a contact manager, address manager and calendar for Gnome. 29 * [http://office.microsoft.com/en-us/outlook/ Microsoft Outlook] can also read iCalendar files and appears as a new static calendar in Outlook. 30 * [https://www.google.com/calendar/ Google Calendar]. 31 * [http://chandlerproject.org Chandler], a personal and small-group task management and calendaring tool, Apache licensed and orphaned since 2009. 32 32 33 33 To subscribe to the roadmap, copy the iCalendar link from the roadmap (found at the bottom of the page) and choose the "Subscribe to remote calendar" action (or similar) of your calendar application, and insert the URL just copied. … … 35 35 '''Note:''' For tickets to be included in the calendar as tasks, you need to be logged in when copying the link. You will only see tickets assigned to yourself and associated with a milestone. 36 36 37 '''Note:''' To include the milestones in Google Calendar you might need to rewrite the URL .38 {{{ 37 '''Note:''' To include the milestones in Google Calendar you might need to rewrite the URL: 38 {{{#!apache 39 39 RewriteEngine on 40 40 RewriteRule ([^/.]+)/roadmap/([^/.]+)/ics /$1/roadmap?user=$2&format=ics -
wiki/pages/TracSearch
r40558 r43921 8 8 9 9 == Quick searches 10 10 11 For quick access to project resources, the quick-search field at the top of every page can be used to enter a [TracLinks wiki link], which will take you directly to the resource identified by that link: 11 12 … … 16 17 * /repos1/trunk -- Opens the browser for the `trunk` directory in the `repos1` repository 17 18 18 == Advanced19 20 === Disabling Quickjump21 19 To disable the Quickjump feature for a keyword start the query with an exclamation mark (`!`): use `!TracGuide` to search for occurrences of the literal word !TracGuide. 22 20 23 === Search Links 21 == Search TracLinks 22 24 23 From the Wiki, it is possible to link to a specific search, using `search:` links: 25 24 * `search:?q=crash` will search for the string "crash" 26 25 * `search:?q=trac+link&wiki=on` will search for "trac" and "link" in wiki pages only 27 26 27 == Search Filters 28 29 On the search page, pressing the modifier key while selecting a search filter will unselect all other search filters. 30 28 31 ---- 29 32 See also: TracGuide, TracLinks, TracQuery -
wiki/pages/TracStandalone
r40558 r43921 95 95 Tracd allows you to run Trac without the need for Apache, but you can take advantage of Apache's password tools (`htpasswd` and `htdigest`) to easily create a password file in the proper format for tracd to use in authentication. (It is also possible to create the password file without `htpasswd` or `htdigest`; see below for alternatives) 96 96 97 Make sure you place the generated password files on a filesystem which supports sub-second timestamps, as Trac will monitor their modified time and changes happening on a filesystem with too coarse-grained timestamp resolution (like `ext2` or `ext3` on Linux, or HFS+ on OSX). 97 {{{#!div style="border: 1pt dotted; margin: 1em" 98 **Attention:** Make sure you place the generated password files on a filesystem which supports sub-second timestamps, as Trac will monitor their modified time and changes happening on a filesystem with too coarse-grained timestamp resolution (like `ext2` or `ext3` on Linux, or HFS+ on OSX). 99 }}} 98 100 99 101 Tracd provides support for both Basic and Digest authentication. Digest is considered more secure. The examples below use Digest; to use Basic authentication, replace `--auth` with `--basic-auth` in the command line. … … 139 141 This section describes how to use `tracd` with Apache .htpasswd files. 140 142 141 Note: It is necessary (at least with Python 2.6) to install the fcrypt package in order to142 decode some htpasswd formats. Trac source code attempt an `import crypt` first, but there143 is no such package for Python 2.6. Only `SHA-1` passwords (since Trac 1.0)work without this module.143 Note: On Windows It is necessary to install the [https://pypi.python.org/pypi/passlib passlib] 144 package in order to decode some htpasswd formats. Only `SHA-1` passwords (since Trac 1.0) 145 work without this module. 144 146 145 147 To create a .htpasswd file use Apache's `htpasswd` command (see [#GeneratingPasswordsWithoutApache below] for a method to create these files without using Apache): … … 303 305 Run tracd: 304 306 {{{#!sh 305 tracd -p 8101 - r -s proxified --base-path=/project/proxified307 tracd -p 8101 -s proxified --base-path=/project/proxified 306 308 }}} 307 309 -
wiki/pages/TracSupport
r40558 r43921 3 3 Like in most [http://www.opensource.org/ open source projects], Trac support is available primarily through the [trac:MailingList mailing list] and the [trac: project wiki]. Both are maintained by the trac community. The [trac: project wiki] is the authoritative source for the TracGuide, consisting of the administrator and user guides for Trac. 4 4 5 There is also an [trac:IrcChannel IRC channel] where online users can help out. Much of the 'live' development discussions also happen there. 5 There is an [trac:IrcChannel IRC channel] where online users can help out. Much of the 'live' development discussions also happen there. 6 7 You can search questions tagged with `trac` on [SO:tagged/trac Stack Overflow]. 6 8 7 9 Before you start a new support query, make sure you have done the appropriate searching: -
wiki/pages/TracSyntaxColoring
r40558 r43921 1 1 = Syntax Coloring of Source Code 2 Trac supports language-specific syntax highlighting of source code within wiki formatted text in [WikiProcessors#CodeHighlightingSupport wiki processors] blocks and in the [TracBrowser repository browser]. Syntax coloring is provided using [http://pygments. pocoo.org/ Pygments], which covers a wide range of programming languages and other structured texts, and is actively supported. If Pygments is not available, Trac will display the content as plain text.2 Trac supports language-specific syntax highlighting of source code within wiki formatted text in [WikiProcessors#CodeHighlightingSupport wiki processors] blocks and in the [TracBrowser repository browser]. Syntax coloring is provided using [http://pygments.org/ Pygments], which covers a wide range of programming languages and other structured texts, and is actively supported. If Pygments is not available, Trac will display the content as plain text. 3 3 4 4 … … 9 9 The Pygments default style can specified in the [TracIni#mimeviewer-section mime-viewer] section of trac.ini. The default style can be overridden by setting a //Style// preference on the [/prefs/pygments preferences page]. 10 10 11 [http://pygments.org/docs/lexers/ Pygments lexer] options can be specified as [WikiProcessors WikiProcessor] arguments and defaults can be set in the [TracIni#pygments-lexer-section environment configuration]. 11 12 12 13 == Syntax Coloring Support -
wiki/pages/TracTickets
r40558 r43921 1 = The Trac Ticket System =1 = The Trac Ticket System 2 2 [[TracGuideToc]] 3 3 4 The Trac ticket database providessimple but effective way to track issues and software bugs within a project.4 The Trac ticket system provides a simple but effective way to track issues and software bugs within a project. 5 5 6 6 As the central project management element of Trac, tickets can be used for '''project tasks''', '''feature requests''', '''bug reports''', '''software support issues''' among others. 7 7 8 As with the TracWiki, this subsystem has been designed with the goal of makinguser contribution and participation as simple as possible.8 As with the TracWiki, this subsystem has been designed to make user contribution and participation as simple as possible. 9 9 10 10 An issue is assigned to a person who must resolve it or reassign the ticket to someone else. All tickets can be edited, annotated, assigned, prioritized and discussed at any time. 11 11 12 12 [=#edit-permissions] 13 However, a Trac installation may place restrictions on who can change what. For example, the default installation doesn't permit to non-authenticated users ("anonymous" users) to change anything, even to comment on an issue, for obvious spam prevention reasons. Check the local contributing policy, which you can usually find on the front page WikiStart, or contact your local Trac administrator.13 However, a Trac installation may place restrictions on who can change what. For example, the default installation doesn't permit to non-authenticated users ("anonymous" users) to change anything, even to comment on an issue, for obvious spam prevention reasons. Check the local contributing policy, which you can usually find on the front page of WikiStart, or contact your local Trac administrator. 14 14 15 == Ticket Fields ==15 == Ticket Fields 16 16 17 17 A ticket contains the following information: 18 18 19 19 * '''Reporter''' — The author of the ticket. 20 * '''Type''' — The category of the ticket. The default types are `defect`, 21 * '''Component''' — The project module or subsystem th is ticket concerns.20 * '''Type''' — The category of the ticket. The default types are `defect`, `enhancement` and `task`. 21 * '''Component''' — The project module or subsystem that this ticket concerns. 22 22 * '''Version''' — Version of the project that this ticket pertains to. 23 * '''Keywords''' — Keywords that a ticket is marked with. Useful for searching and report generation.24 * '''Priority''' — The importance of this issue, ranging from ''trivial'' to ''blocker''. A pull-down if differentpriorities are defined.25 * '''Milestone''' — Due date of when this issue should be resolved. A pull-down menu containing a list ofmilestones.23 * '''Keywords''' — Keywords that a ticket is tagged with. Useful for searching and report generation. 24 * '''Priority''' — The importance of this issue, ranging from ''trivial'' to ''blocker''. A dropdown list when multiple priorities are defined. 25 * '''Milestone''' — Due date of when this issue should be resolved. A dropdown list containing the milestones. 26 26 * '''Assigned to/Owner''' — Principal person responsible for handling the issue. 27 * '''Cc''' — A comma-separated list of other users or email addresses to notify. ''Note that this does not imply responsibility or any other policy.''27 * '''Cc''' — A comma-separated list of other users or email addresses to notify. Note that this does not imply responsibility or any other policy. 28 28 * '''Resolution''' — Reason for why a ticket was closed. One of {{{fixed}}}, {{{invalid}}}, {{{wontfix}}}, {{{duplicate}}}, {{{worksforme}}}. 29 29 * '''Status''' — What is the current status? The statuses are defined in the [TracWorkflow#BasicTicketWorkflowCustomization ticket workflow]. For the default workflow the statuses are `new`, `assigned`, `accepted`, `closed` and `reopened`. … … 38 38 - Description of the builtin ''priority'' values is available at [trac:TicketTypes#Whyistheseverityfieldgone TicketTypes] 39 39 40 == Changing and Commenting Tickets ==40 == Changing and Commenting Tickets 41 41 42 42 With appropriate permissions, as already mentioned [#edit-permissions above], a ticket entered into Trac can at any time be modified by '''annotating'''. … … 44 44 Then, annotations like changes and comments to the ticket are logged as a part of the ticket itself. When viewing a ticket, the history of changes will appear below the main ticket area. 45 45 46 Comment editing (available since 0.12) is meant to be used to make small corrections to comments, like fixing formatting, forgotten WikiFormatting or spelling errors, not major edits. For longer edits, you should be adding a new comment instead. Editing a comment will not produce a new entry on [/timeline] while entering a new comment or other changes will do.46 Comment editing (available since 0.12) is meant to be used to make small corrections to comments, like fixing formatting, forgotten WikiFormatting or spelling errors, not major edits. For longer edits, you should be adding a new comment instead. Editing a comment will not produce a new entry on [/timeline], while entering a new comment or other changes will do. 47 47 48 48 All edits (field changes, new comments, comment edits) update the "last changed" time of the ticket. 49 50 49 51 50 '''Notes:''' … … 56 55 - See TracWorkflow for information about the state transitions (ticket lifecycle), and how this workflow can be customized. 57 56 58 == Default Values for Drop-Down Fields ==57 == Default Values for Drop-Down Fields 59 58 60 59 The option selected by default for the various drop-down fields can be set in [wiki:TracIni trac.ini], in the `[ticket]` section: 61 60 62 * `default_component`: Name of the component selected by default 63 * `default_milestone`: Name of the default milestone 64 * `default_priority`: Default priority value 65 * `default_severity`: Default severity value 66 * `default_type`: Default ticket type 67 * `default_version`: Name of the default version 61 * `default_component`: Name of the component selected by default. 62 * `default_milestone`: Name of the default milestone. 63 * `default_priority`: Default priority value. 64 * `default_severity`: Default severity value. 65 * `default_type`: Default ticket type. 66 * `default_version`: Name of the default version. 68 67 * `default_owner`: Name of the default owner. If set to the text `< default >` (the default value), the component owner is used. 69 68 70 If any of these options are omitted, the default value will either be the first in the list, or an empty value, depending on whether the field in question is required to be set. 69 If any of these options are omitted, the default value will either be the first in the list, or an empty value, depending on whether the field in question is required to be set. Some of these can be chosen through the [trac:WebAdmin WebAdmin] plugin in the "Ticket System" section, others can be set in the [[wiki:TracIni#ticket-section|"[ticket]"]] section in `trac.ini`. 71 70 72 73 == Hiding Fields and Adding Custom Fields == 71 == Hiding Fields and Adding Custom Fields 74 72 75 73 Many of the default ticket fields can be hidden from the ticket web interface simply by removing all the possible values through [wiki:TracAdmin trac-admin]. This of course only applies to drop-down fields, such as ''type'', ''priority'', ''severity'', ''component'', ''version'' and ''milestone''. … … 77 75 Trac also lets you add your own custom ticket fields. See TracTicketsCustomFields for more information. 78 76 77 == Assign-to as Drop-Down List 79 78 80 == Assign-to as Drop-Down List == 79 If the list of possible ticket owners is finite, you can change the ''assign-to'' ticket field from a text input to a drop-down list. This is done by setting the `restrict_owner` option of the `[ticket]` section in [wiki:TracIni trac.ini] to `true`. In that case, Trac will populate the list with all users who **have an authenticated session** and possess the `TICKET_MODIFY` [TracPermissions permissions]. 81 80 82 If the list of possible ticket owners is finite, you can change the ''assign-to'' ticket field from a text input to a drop-down list. This is done by setting the `restrict_owner` option of the `[ticket]` section in [wiki:TracIni trac.ini] to `true`. In that case, Trac will populate the list with all users who have authenticated with the project and possess the `TICKET_MODIFY` [TracPermissions permissions]. 81 An authenticated session will be created the first time a user authenticates with the project. You can manually add an authenticated session using the ["TracAdmin#?session add" trac-admin] `session add` command. The `:1` suffix on the session id (i.e. username) is the key to creating an authenticated session: 82 {{{#!sh 83 trac-admin /path/to/projenv session add <sid>:1 [name] [email] 84 }}} 83 85 84 86 You may find the dropdown list is //overpopulated// with users that are no longer active in the project. Revoking authentication privileges will not remove the session data that is used to populate the dropdown list. The [wiki:TracAdmin trac-admin] command can be used to list and remove sessions: … … 96 98 97 99 '''Notes:''' 98 - If you need serious flexibility and aren't afraid of a little plugin coding of your own, see [http://trac-hacks.org/wiki/FlexibleAssignToPlugin FlexibleAssignTo]. 100 - If you need more flexibility and aren't afraid of a little plugin coding of your own, see the [https://trac-hacks.org/wiki/FlexibleAssignToPlugin FlexibleAssignTo plugin]. 101 102 - Activating this option may cause some performance degradation. Read more about this in the [trac:TracPerformance#Configuration Trac performance] page. 99 103 100 - Activating this option may cause some performance degradation. Read more about this in the [trac:TracPerformance#Configuration Trac performance] page. 101 102 == Preset Values for New Tickets == 104 == Preset Values for New Tickets 103 105 104 106 To create a link to the new-ticket form filled with preset values, you need to call the `/newticket?` URL with `variable=value` separated by `&`. Possible variables are: 105 107 106 * '''type''' — The type droplist 107 * '''reporter''' — Name or email of the reporter 108 * '''summary''' — Summary line for the ticket 109 * '''description''' — Long description of the ticket 110 * '''component''' — The component drop list111 * '''version''' — The version drop list112 * '''severity''' — The severity drop list113 * '''keywords''' — The keywords 114 * '''priority''' — The priority drop list115 * '''milestone''' — The milestone drop list116 * '''owner''' — The person responsible for the ticket 117 * '''cc''' — The list of emails for notifying about the ticket change 108 * '''type''' — The type droplist. 109 * '''reporter''' — Name or email of the reporter. 110 * '''summary''' — Summary line for the ticket. 111 * '''description''' — Long description of the ticket. 112 * '''component''' — The component dropdown list. 113 * '''version''' — The version dropdown list. 114 * '''severity''' — The severity dropdown list. 115 * '''keywords''' — The keywords or tags. 116 * '''priority''' — The priority dropdown list. 117 * '''milestone''' — The milestone dropdown list. 118 * '''owner''' — The person responsible for the ticket. 119 * '''cc''' — The list of emails for notifying about the ticket change. 118 120 119 Example: ''`[/newticket?summary=Compile%20Error&version=1.0&component=gui]`''121 Example: `[/newticket?summary=Compile%20Error&version=1.0&component=gui]` 120 122 121 123 ---- 122 See also: 124 See also: TracGuide, TracWiki, TracTicketsCustomFields, TracNotification, TracReports, TracQuery -
wiki/pages/TracUnicode
r40558 r43921 1 = Unicode Support in Trac = 1 = Unicode Support in Trac 2 2 3 [[TracGuideToc]] 3 4 4 Trac encodes all text using [ http://en.wikipedia.org/wiki/UTF-8 UTF-8], including text in tickets and wiki pages. Internal processing of text uses true [http://en.wikipedia.org/wiki/Unicode Unicode] representations. As such, it supports most (all?)commonly used character encodings.5 Trac encodes all text using [wikipedia:UTF-8], including text in tickets and wiki pages. Internal processing of text uses true [wikipedia:Unicode] representations. As such, it supports most commonly used character encodings. 5 6 6 If the default encoding in your source code repository is not UTF-8, you can specify it in the [TracIni#trac-section trac.ini]:7 {{{ 7 If the default encoding in your source code repository is not UTF-8, you can specify it in your [TracIni#trac-section trac.ini] file: 8 {{{#!ini 8 9 default_charset = gbk 9 10 }}} … … 13 14 To convert your database to UTF-8, the easiest way is to create a dump of the database, convert it into UTF-8, for example using [http://www.gnu.org/software/libiconv/documentation/libiconv/iconv.1.html iconv], and then import it back into the database. 14 15 15 == Examples ==16 == Examples 16 17 17 === Arabic === 18 === Arabic 19 18 20 تراك يقوم بحفظ كل الكلمات باستخدام صيغة UTF-8، بما في ذلك الكلمات المستخدمة في صفحات التيكت والويكي. 19 21 20 === Bulgarian === 22 === Bulgarian 23 21 24 Българският език работи ли? 22 25 23 === Česky === 26 === Česky 27 24 28 Čeština v kódování UTF-8, žádný problém. 25 29 26 === Chinese === 27 Traditional: 繁體中文, 漢字測試; Simplified: 简体中文,汉字测试 30 === Chinese 28 31 29 === Croatian === 30 Ako podržava srpski i slovenski mora podržavati i Hrvatski - čćžšđ ČĆŽŠĐ 32 Traditional: 繁體中文, 漢字測試 31 33 32 === English === 34 Simplified: 简体中文,汉字测试 35 36 === Croatian 37 38 Ako podržava srpski i slovenski mora podržavati i Hrvatski - čćžšđ ČĆŽŠĐ. 39 40 === English 41 33 42 Yes indeed, Trac supports English. Fully. 34 43 35 === Français === 36 Il est possible d'écrire en Français : à, ç, û, ... 44 === Français 37 45 38 === German === 39 Trac-Wiki muß auch deutsche Umlaute richtig anzeigen: ö, ä, ü, Ä, Ö, Ü; und das scharfe ß 46 Il est possible d'écrire en Français : à, ç, û. 40 47 41 === Greek === 48 === German 49 50 Trac-Wiki muß auch deutsche Umlaute richtig anzeigen: ö, ä, ü, Ä, Ö, Ü; und das scharfe ß. 51 52 === Greek 53 42 54 Τα Ελληνικά υποστηρίζονται επαρκώς επίσης. 43 55 44 === Hebrew === 56 === Hebrew 57 45 58 אני יכול לאכול זכוכית וזה לא מזיק לי 46 59 47 === Hindi === 60 === Hindi 61 48 62 अब हिन्दी में। 49 63 50 === Hungarian === 51 Árvíztűrő tükörfúrógép 64 === Hungarian 52 65 53 === Icelandic === 66 Árvíztűrő tükörfúrógép. 67 68 === Icelandic 69 54 70 Ævar sagði við ömmu sína: Sjáðu hvað ég er stór! 55 71 56 === Japanese === 72 === Japanese 73 57 74 漢字 ひらがな カタカナ ハンカクカナ 日本語試験 58 75 59 === Korean === 60 이번에는 한글로 써보겠습니다. 잘 보이나요? 한글 76 === Korean 61 77 62 === Latvian === 78 이번에는 한글로 써보겠습니다. 잘 보이나요? 한글. 79 80 === Latvian 63 81 64 82 Latviešu valoda arī strādā! 65 83 66 === Lithuanian === 67 Sudalyvaukime ir mes. Ar veikia lietuviškos raidės? ąčęėįšųūž ĄČĘĖĮŠŲŪŽ Žinoma, kad veikia :) 68 Kas tie mes? 84 === Lithuanian 69 85 70 === Persian (Farsi) === 86 Sudalyvaukime ir mes. Ar veikia lietuviškos raidės? ąčęėįšųūž ĄČĘĖĮŠŲŪŽ Žinoma, kad veikia. Kas tie mes? 87 88 === Persian (Farsi) 89 71 90 این یک متن فارسی است ولی امکان نوشتن مستقیم فارسی نیست چون حالت متن از راست به چپ و جود ندارد برای فارسی نوشتن باید از HTML استفاده کنید. 72 91 {{{ … … 80 99 }}} 81 100 82 === Polish === 83 Pchnąć w tę łódź jeża lub osiem skrzyń fig; Nocna gżegżółka zawsze dzienną przekuka. 101 === Polish 84 102 85 === Portuguese === 103 Pchnąć w tę łódź jeża lub osiem skrzyń fig. Nocna gżegżółka zawsze dzienną przekuka. 104 105 === Portuguese 106 86 107 É possível guardar caracteres especias da língua portuguesa, incluindo o símbolo da moeda européia '€', trema 'ü', crase 'à', agudos 'áéíóú', circunflexos 'âêô', til 'ãõ', cedilha 'ç', ordinais 'ªº', grau '°¹²³'. 87 108 88 === Russian === 89 Проверка русского языка: кажется работает... И буква "ё" есть... 109 === Russian 90 110 91 === Serbian === 111 Проверка русского языка: кажется работает. И буква "ё" есть. 112 113 === Serbian 114 92 115 Podržan, uprkos činjenici da se za njegovo pisanje koriste чак два алфабета. 93 116 94 === Slovenian === 117 === Slovenian 118 95 119 Ta suhi škafec pušča vodo že od nekdaj! 96 120 97 === Spanish === 98 Esto es un pequeño texto en Español, donde el veloz murciélago hindú comía cardlllo y kiwi 121 === Spanish 99 122 100 === Swedish === 123 Esto es un pequeño texto en Español, donde el veloz murciélago hindú comía cardillo y kiwi. 124 125 === Swedish 126 101 127 Räven raskar över isen med luva på. 102 128 103 === Thai === 129 === Thai 130 104 131 Trac แสดงภาษาไทยได้อย่างถูกต้อง! 105 132 106 === Ukrainian === 107 Перевірка української мови... 133 === Ukrainian 108 134 109 === Urdu === 135 Перевірка української мови. 136 137 === Urdu 138 110 139 ٹریک اردو بھی سپورٹ کرتا ہے۔ 111 140 112 === Vietnamese === 141 === Vietnamese 142 113 143 Viết tiếng Việt cũng được. -
wiki/pages/TracUpgrade
r40558 r43921 15 15 === 2. Update the Trac Code #UpdatetheTracCode 16 16 17 Get the new version as described in TracInstall, or your operating system specific procedure. 18 19 If you already have a 0.12 version of Trac installed via `easy_install`, it might be easiest to also use `easy_install` to upgrade your Trac installation: 20 21 {{{#!sh 22 easy_install --upgrade Trac==1.0 23 }}} 24 25 If you do a manual (not operating system-specific) upgrade, you should also stop any running Trac servers before the installation. Doing "hot" upgrades is not advised, especially on Windows ([trac:#7265]). 17 Get the new version as described in TracInstall, or through your operating system package manager. 18 19 If you already an earlier version of Trac installed via `easy_install`, it might be easiest to also use `easy_install` to upgrade your Trac installation: 20 21 {{{#!sh 22 easy_install --upgrade Trac==1.2 23 }}} 26 24 27 25 You may also want to remove the pre-existing Trac code by deleting the `trac` directory from the Python `lib/site-packages` directory, or remove Trac `.egg` files from former versions. … … 31 29 * on MacOSX: `/Library/Python/2.X/site-packages` 32 30 33 You may also want to remove the Trac `cgi-bin`, `htdocs`, `templates` and `wiki-default` directories that are commonly found in a directory called `share/trac`. The exact location depends on your platform. This cleanup is not mandatory, but makes it easier to troubleshoot issues later on, as your installation is uncluttered by code or templates from a previous release that is not used anymore. As usual, make a backup before actually removing things.31 You may also want to remove the directory in which your static resources are [TracInstall#cgi-bin deployed]. The exact location depends on your platform. This cleanup is not mandatory, but makes it easier to troubleshoot issues later on, as your installation is uncluttered by code or templates from a previous release that is not used anymore. As usual, make a backup before actually removing things. 34 32 35 33 === 3. Upgrade the Trac Environment #UpgradetheTracEnvironment … … 42 40 }}} 43 41 44 This command will do nothingif the environment is already up-to-date.42 This command will not have any effect if the environment is already up-to-date. 45 43 46 44 Note that a backup of your database will be performed automatically prior to the upgrade. 47 This feature is relatively new for PostgreSQL or MySQL databases, so if it fails, you will have to backup the database manually. Then, to perform the actual upgrade , run:45 This feature is relatively new for PostgreSQL or MySQL databases, so if it fails, you will have to backup the database manually. Then, to perform the actual upgrade: 48 46 {{{#!sh 49 47 trac-admin /path/to/projenv upgrade --no-backup … … 65 63 trac-admin /path/to/env deploy /deploy/path 66 64 }}} 67 this will extract static resources and CGI scripts (`trac.wsgi`, etc) from new Trac version and its plugins into `/deploy/path`. 65 66 This will extract static resources and CGI scripts (`trac.wsgi`, etc) from new Trac version and its plugins into `/deploy/path`. 68 67 69 68 Some web browsers (IE, Opera) cache CSS and Javascript files aggressively, so you may need to instruct your users to manually erase the contents of their browser's cache, a forced refreshed (`<F5>`) should be enough. … … 74 73 === 6. Steps specific to a given Trac version 75 74 76 ==== Upgrading from Trac 1.0 to 1. 1.x #to1.1.x75 ==== Upgrading from Trac 1.0 to 1.2 #to1.2 77 76 78 77 ===== Python 2.5 no longer supported 79 Upgrade Python to at least 2.6, but not 3.0. 80 81 ===== New workflow actions 82 83 The ticket creation step is now controlled with a workflow action. The default workflow has `create` and `create_and_assign` actions. The `create` action will always be added when upgrading the database. The `create_and_assign` action will be added if the workflow has an //assigned// state. You may want to edit your workflow after upgrading the database to customize the actions available on the //New Ticket// page. 78 79 Upgrade Python to at least 2.6 or 2.7, but not 3.0 or greater. 80 81 ===== Obsolete Plugins 82 83 Trac has added functionality equivalent to the following plugins: 84 * [https://trac-hacks.org/wiki/AdminEnumListPlugin AdminEnumListPlugin] 85 * [https://trac-hacks.org/wiki/DateFieldPlugin DateFieldPlugin]: see the **time** [TracTicketsCustomFields#AvailableFieldTypesandOptions custom field type] 86 * [https://trac-hacks.org/wiki/GroupBasedRedirectionPlugin GroupBasedRedirectionPlugin]: the default handler can set as a user preference. 87 * [https://trac-hacks.org/wiki/LinenoMacro LinenoMacro]: see WikiProcessors#AvailableProcessors 88 * [https://trac-hacks.org/wiki/NeverNotifyUpdaterPlugin NeverNotifyUpdaterPlugin]: see [TracNotification#notification-subscriber-section notification subscribers] 89 * [https://trac-hacks.org/wiki/QueryUiAssistPlugin QueryUiAssistPlugin]: see TracQuery#Filters. 90 * [https://trac-hacks.org/wiki/TicketCreationStatusPlugin TicketCreationStatusPlugin]: see [#NewWorkflowActions] 91 92 The plugins should be removed when upgrading Trac to 1.2. 93 94 ===== New workflow actions #NewWorkflowActions 95 96 The ticket creation step is controlled with a workflow action. The default workflow has `create` and `create_and_assign` actions. The `create` action will always be added when upgrading the database. The `create_and_assign` action will be added if the workflow has an //assigned// state. You may want to edit your workflow after upgrading the database to customize the actions available on the //New Ticket// page. 84 97 85 98 ===== New permissions policy for read-only wiki pages 99 86 100 Since 1.1.2 the read-only attribute of wiki pages is enabled and enforced only when `ReadonlyWikiPolicy` is in the list of active permission policies. If `[trac] permission_policy` has the default value `DefaultPermissionPolicy, LegacyAttachmentPolicy`, then `ReadonlyWikiPolicy` should be automatically appended to the list when upgrading the environment: 87 101 {{{#!ini … … 91 105 LegacyAttachmentPolicy 92 106 }}} 93 If other permission policies are enabled, //trac.ini// will need to be edited to append `ReadonlyWikiPolicy` to the list of active `permission_policies`. See TracFineGrainedPermissions#ReadonlyWikiPolicy for additional details on the proper ordering. 107 108 If other permission policies are enabled, `trac.ini` will need to have `ReadonlyWikiPolicy` appended to the list of active `permission_policies`. See TracFineGrainedPermissions#ReadonlyWikiPolicy for additional details on the proper ordering. 94 109 95 110 ==== Upgrading from Trac 0.12 to Trac 1.0 #to1.0 96 111 97 112 ===== Python 2.4 no longer supported 113 98 114 Upgrade Python to at least 2.5, but not 3.0. 99 115 116 ===== Obsolete Plugins 117 118 Trac has added functionality equivalent to the following plugins: 119 120 * [https://trac-hacks.org/wiki/BatchModifyPlugin BatchModifyPlugin] 121 * [https://trac-hacks.org/wiki/GitPlugin GitPlugin] 122 * [https://trac-hacks.org/wiki/OverrideEditPlugin OverrideEditPlugin] 123 124 The plugins should be removed when upgrading Trac to 1.0. 125 100 126 ===== Subversion components not enabled by default for new installations 127 101 128 The Trac components for Subversion support are no longer enabled by default. To enable the svn support, you need to make sure the `tracopt.versioncontrol.svn` components are enabled, for example by setting the following in the TracIni: 102 129 {{{#!ini … … 104 131 tracopt.versioncontrol.svn.* = enabled 105 132 }}} 133 106 134 The upgrade procedure should take care of this and change the TracIni appropriately, unless you already had the svn components explicitly disabled. 107 135 108 136 ===== Attachments migrated to new location 137 109 138 Another step in the automatic upgrade will change the way the attachments are stored. Create a backup of the `attachments` directory before upgrading. In case the `attachments` directory contains some files which are //not// attachments, the last step of the migration to the new layout will fail: the deletion of the now unused `attachments` directory can't be done if there are still files and folders in it. You may ignore this error, but better to move them elsewhere and remove the `attachments` directory manually. The attachments themselves are now all located in your environment below the `files/attachments` directory. 110 139 111 140 ===== Behavior of `[ticket] default_owner` changed 141 112 142 Prior to 1.0, the owner field of new tickets always defaulted to `[ticket] default_owner` when the value was not empty. If the value was empty, the owner field defaulted to to the Component's owner. In 1.0 and later, the `default_owner` must be set to `< default >` to make new tickets default to the Component's owner. This change allows the `default_owner` to be set to an empty value if no default owner is desired. 113 143 … … 115 145 116 146 ===== Python 2.3 no longer supported 147 117 148 The minimum supported version of Python is now 2.4. 118 149 119 150 ===== SQLite v3.x required 151 120 152 SQLite v2.x is no longer supported. If you still use a Trac database of this format, you'll need to convert it to SQLite v3.x first. See [trac:PySqlite#UpgradingSQLitefrom2.xto3.x] for details. 121 153 122 154 ===== [trac:PySqlite] 2 required 155 123 156 [trac:PySqlite] 1.1.x is no longer supported. Please install 2.5.5 or later if possible, see [#Tracdatabaseupgrade Trac database upgrade] below. 124 157 158 ===== Obsolete Plugins 159 160 Trac has added functionality equivalent to the following plugins: 161 162 * [https://trac-hacks.org/wiki/AutoQueryPlugin AutoQueryPlugin] 163 * [https://trac-hacks.org/wiki/AdminConsoleProviderPatch AdminConsoleProviderPatch] 164 * [https://trac-hacks.org/wiki/AnchorMacro AnchorMacro]: see WikiFormatting#SettingAnchors 165 * [https://trac-hacks.org/wiki/TicketChangePlugin TicketChangePlugin]: see [TracPermissions#TicketSystem TICKET_EDIT_COMMENT permission] 166 * [https://trac-hacks.org/wiki/TicketDeletePlugin TicketDeletePlugin]: see `tracopt.ticket.deleter` 167 * [https://trac-hacks.org/wiki/SubversionLocationPlugin SubversionLocationPlugin]: see TracRepositoryAdmin#Repositories 168 * [https://trac-hacks.org/wiki/WikiCreoleRendererPlugin WikiCreoleRendererPlugin]: see [trac:WikiCreole] 169 * [https://trac-hacks.org/wiki/RepoRevisionSyntaxPlugin RepoRevisionSyntaxPlugin] (added in 0.12.1) 170 171 The plugins should be removed when upgrading Trac to 0.12. 172 125 173 ===== Multiple Repository Support 174 126 175 The latest version includes support for multiple repositories. If you plan to add more repositories to your Trac instance, please refer to TracRepositoryAdmin#Migration. 127 176 … … 137 186 138 187 ===== Improved repository synchronization 188 139 189 In addition to supporting multiple repositories, there is now a more efficient method for synchronizing Trac and your repositories. 140 190 … … 144 194 145 195 ===== Authz permission checking 196 146 197 The authz permission checking has been migrated to a fine-grained permission policy. If you use authz permissions (aka `[trac] authz_file` and `authz_module_name`), you must add `AuthzSourcePolicy` in front of your permission policies in `[trac] permission_policies`. You must also remove `BROWSER_VIEW`, `CHANGESET_VIEW`, `FILE_VIEW` and `LOG_VIEW` from your global permissions with `trac-admin $ENV permission remove` or the "Permissions" admin panel. 147 198 148 199 ===== Microsecond timestamps 200 149 201 All timestamps in database tables, except the `session` table, have been changed from "seconds since epoch" to "microseconds since epoch" values. This change should be transparent to most users, except for custom reports. If any of your reports use date/time columns in calculations (e.g. to pass them to `datetime()`), you must divide the values retrieved from the database by 1'000'000. Similarly, if a report provides a calculated value to be displayed as a date/time (i.e. with a column named "time", "datetime", "changetime", "date", "created" or "modified"), you must provide a microsecond timestamp, that is, multiply your previous calculation with 1'000'000. 150 202 151 203 ==== Upgrading from Trac 0.10 to Trac 0.11 204 152 205 ===== Site Templates and Styles 206 153 207 The templating engine has changed in 0.11 to Genshi, please look at TracInterfaceCustomization for more information. 154 208 … … 156 210 157 211 ===== Trac Macros, Plugins 212 158 213 The Trac macros will need to be adapted, as the old-style wiki-macros are not supported anymore due to the drop of [trac:ClearSilver] and the HDF. They need to be converted to the new-style macros, see WikiMacros. When they are converted to the new style, they need to be placed into the plugins directory instead and not wiki-macros, which is no longer scanned for macros or plugins. 159 214 160 215 ===== For FCGI/WSGI/CGI users 216 161 217 For those who run Trac under the CGI environment, run this command in order to obtain the trac.*gi file: 162 218 {{{#!sh … … 167 223 168 224 ===== Web Admin plugin integrated 225 169 226 If you had the [trac:WebAdmin] plugin installed, you can uninstall it as it is part of the Trac code base since 0.11. 170 227 171 228 ===== New Default Configurable Workflow 172 229 173 When you run `trac-admin <env> upgrade`, your `trac.ini` will be modified to include a `[ticket-workflow]` section. The workflow configured in this case is the original workflow, so that ticket actions will behave like they did in 0.10. 174 175 Graphically, that looks like this: 230 When you run `trac-admin <env> upgrade`, your `trac.ini` will be modified to include a `[ticket-workflow]` section. The workflow configured in this case is the original workflow, so that ticket actions will behave like they did in 0.10: 176 231 177 232 {{{#!Workflow width=500 height=240 … … 213 268 214 269 === Wiki Upgrade 270 215 271 `trac-admin` will not delete or remove default wiki pages that were present in a previous version but are no longer in the new version. 216 272 … … 220 276 221 277 === Parent dir 278 222 279 If you use a Trac parent env configuration and one of the plugins in one child does not work, none of the children will work. 223 280 … … 234 291 === Changing Database Backend 235 292 236 The [http ://trac-hacks.org/wiki/TracMigratePlugin TracMigratePlugin] on [http://trac-hacks.org trac-hacks.org] has been written to assist in migrating between SQLite, MySQL and PostgreSQL databases.293 The [https://trac-hacks.org/wiki/TracMigratePlugin TracMigratePlugin] on [https://trac-hacks.org trac-hacks.org] has been written to assist in migrating between SQLite, MySQL and PostgreSQL databases. 237 294 238 295 === Upgrading from older versions of Trac #OlderVersions -
wiki/pages/TracWiki
r40558 r43921 2 2 [[TracGuideToc]] 3 3 4 Trac has a built-in wiki system which you can use for organizing knowledge and information in a very flexible way by [WikiNewPage creating pages] containing an intuitive and easy to learn textual markup. Th is text markup is also used in all other parts of the system, not only in [wiki:TitleIndex wiki pages], but also in [wiki:TracTickets ticket] description and comments, [wiki:TracChangeset check-in log messages], [wiki:TracRoadmap milestone] descriptions and [wiki:TracReports report] descriptions,even in third-party extensions.4 Trac has a built-in wiki system which you can use for organizing knowledge and information in a very flexible way by [WikiNewPage creating pages] containing an intuitive and easy to learn textual markup. The wiki markup is used throughout Trac, so not only in [wiki:TitleIndex wiki pages], but also in [TracTickets ticket] description and comments, [TracChangeset version control] log messages, [TracRoadmap milestone] descriptions, [TracReports report] descriptions and even in third-party extensions. 5 5 It allows for formatted text and hyperlinks in and between all Trac modules. 6 6 7 Editing wiki text is easy, using any web browser and a simple [WikiFormatting formatting system], rather than more complex markup languages like HTML. The reasoning behind its design is that HTML, with its large collection of nestable tags, is too complicated to allow fast-paced editing, and distracts from the actual content of the pages. Note though that Trac also supports [WikiHtml HTML], [WikiRestructuredText reStructuredText] and [http://www.textism.com/tools/textile/ Textile] as alternative markup formats, which can eventually be used in parts of a page (so called wiki “blocks”).7 Editing wiki text is easy, as compared to complex markup languages like HTML, using any web browser and simple [WikiFormatting formatting]. The motivation for wiki markup is that HTML, with its large collection of nestable tags, is too complicated to allow fast-paced editing, and distracts from the actual content of the pages. Note that Trac also supports [WikiHtml HTML], [WikiRestructuredText reStructuredText] and [https://txstyle.org Textile] as alternative markup formats, which can be used in parts of a page, so called wiki blocks. 8 8 9 The main goal of the wiki is to make editing text eas ier and ''encourage'' people to contribute and annotate text content fora project. Trac also provides a simple toolbar to make formatting text even easier, and supports the [http://universaleditbutton.org/Universal_Edit_Button universal edit button] of your browser.9 The main goal of the wiki is to make editing text easy in order to ''encourage'' people to contribute to a project. Trac also provides a simple toolbar to make formatting text even easier, and supports the [http://universaleditbutton.org/Universal_Edit_Button universal edit button] of your browser. 10 10 11 11 The wiki itself does not enforce any structure, but rather resembles a stack of empty sheets of paper, where you can organize information and documentation as you see fit, and later reorganize if necessary. 12 As contributing to a wiki is essentially building hypertext, 13 general advice regarding HTML authoring apply here as well. 14 For example, the ''[http://www.w3.org/Provider/Style Style Guide for online hypertext]'' explains how to think about the 15 [http://www.w3.org/Provider/Style/Structure.html overall structure of a work] 16 and how to organize information [http://www.w3.org/Provider/Style/WithinDocument.html within each document]. One of the most important tips is “make your HTML page such that you can read it even if you don't follow any links.” 12 As contributing to a wiki is essentially building hypertext, general advice regarding HTML authoring apply here as well. 13 For example, the ''[https://www.w3.org/Provider/Style Style Guide for online hypertext]'' explains how to think about the [https://www.w3.org/Provider/Style/Structure.html overall structure of a work] and how to organize information [https://www.w3.org/Provider/Style/WithinDocument.html within each document]. One of the most important tips is to "make your HTML page such that you can read it, even if you don't follow any links". 17 14 18 15 Learn more about: 19 * WikiFormatting rules, including advanced topics like WikiMacros and WikiProcessors 20 * How to use WikiPageNames and other forms of TracLinks which are used to refer in a precise way to any resource within Trac16 * WikiFormatting rules, including advanced topics like WikiMacros and WikiProcessors. 17 * How to use WikiPageNames and other forms of TracLinks which are used to refer to any resource within Trac. 21 18 22 If you want to practice editing, please use the SandBox. Note that not all Trac wiki s are editable by anyone, this depends on the local policy; check with your Trac administrators.19 If you want to practice editing, please use the SandBox. Note that not all Trac wiki pages are editable by anyone, this depends on the local policy; check with your Trac administrators. 23 20 24 Before saving your changes, you can ''Preview'' the page or ''Review the Changes'' you've made.25 You can get an automatic preview of the formatting as you type when you activate the ''Edit Side-by-side'' mode (you have to Preview the page for the setting to take effect). '' There is a [wiki:/TracIni#trac-section configurable delay] between when you make your edit and when the automatic preview will update.''21 Before saving your changes, you can ''Preview'' the page or ''Review Changes'' you have made. 22 You can get an automatic preview of the formatting as you type when you activate the ''Edit Side-by-side'' mode. There is a [wiki:TracIni#/auto_preview_timeout configurable delay] between when you make your edit and when the automatic preview will update. 26 23 27 24 Some more information about wikis on the web: 28 * A definition of [http ://wikipedia.org/wiki/Wiki Wiki], in a famous wiki encyclopedia29 * The [http://c2.com/cgi/wiki?WikiHistory History] of the original wiki30 * A wiki page explaining [http://www.usemod.com/cgi-bin/mb.pl?WhyWikiWorks why wiki works] 25 * A definition of [https://wikipedia.org/wiki/Wiki Wiki] according to Wikipedia. 26 * The [http://c2.com/cgi/wiki?WikiHistory history] behind the original wiki. 27 * A wiki page explaining [http://www.usemod.com/cgi-bin/mb.pl?WhyWikiWorks why wiki works]. 31 28 32 29 ---- -
wiki/pages/WikiDeletePage
r40558 r43921 1 1 = Deleting a Wiki Page = 2 2 3 Existing wiki pages can be completely deleted using the ''Delete Page'' or the ''Delete this Version'' buttons at the bottom of the wiki page. These buttons are only visible for users with `WIKI_DELETE` permissions.3 Wiki pages can be completely deleted using the //Delete page// or the //Delete this version// button at the bottom of the wiki page. These buttons are only visible for users that have the `WIKI_DELETE` permission. 4 4 5 5 '''Note:''' Deleting a wiki page is an irreversible operation. 6 6 7 If you want to delete a page because you actually re-created a new page with the same content but a different name, it is recommended to keep the page and use it as a redirection page instead of completely deleting it, as to not frustrate the visitor with broken links when coming to the site from a search engine. 7 Deleting specific versions or even complete pages can make sense to remove spam or other abusive submissions. 8 8 9 In this situation, chances are that you actually wanted to [[WikiNewPage#renaming|rename]] the page instead of doing a copy + delete. 10 The ''Rename'' operation also offers you the possibility to create a redirection page. 9 However, if you want to delete a page because you re-created a new page with the same content but a different name, it is recommended to keep the page and use it as a redirection page instead of completely deleting it. This will avoid frustrating the visitor with broken links, particularly when coming to the site from a search engine. 10 11 In this situation, chances are that you actually wanted to [[WikiNewPage#renaming|rename]] the page instead of doing a copy and delete. 12 The //Rename// operation offers you the possibility to create a redirection page. 11 13 A redirection page is a short page that contains a link such as “See !SomeOtherPage”. 12 13 However, deleting specific versions or even complete pages can make sense to remove spam or other abusive submissions.14 14 15 15 ---- -
wiki/pages/WikiFormatting
r40558 r43921 5 5 Wiki markup is a core feature in Trac, tightly integrating all the other parts of Trac into a flexible and powerful whole. 6 6 7 Trac has a built in small and powerful wiki rendering engine. This wiki engine implements an evergrowing subset of the commands from other popular Wikis, especially [http://moinmo.in/ MoinMoin] and [trac:WikiCreole].7 Trac has a built-in small and powerful wiki rendering engine. This wiki engine implements a growing subset of the commands from other popular Wikis, especially [http://moinmo.in/ MoinMoin] and [trac:WikiCreole]. 8 8 9 9 This page will give you an in-depth explanation of the wiki markup available anywhere WikiFormatting is allowed. … … 12 12 13 13 A few other wiki pages present the advanced features of the Trac wiki markup in more depth: 14 - TracLinks covers all the possible ways to refer precisely to any Trac resource or parts thereof 15 - WikiPageNames covers the various names a wiki page can take, CamelCase or not16 - WikiMacros lists the macros available for generating dynamic content 17 - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways 18 - [trac:wiki:TracDev/Proposals/AdvancedWikiOperations AdvancedWikiOperations] provides some operations in uncommon or administrative scenarios 14 - TracLinks covers all the possible ways to refer precisely to any Trac resource or parts thereof. 15 - WikiPageNames covers the various names a wiki page can take, whether in CamelCase or not. 16 - WikiMacros lists the macros available for generating dynamic content. 17 - WikiProcessors and WikiHtml details how parts of the wiki text can be processed in special ways. 18 - [trac:wiki:TracDev/Proposals/AdvancedWikiOperations AdvancedWikiOperations] provides some operations in uncommon or administrative scenarios. 19 19 20 20 == Common wiki markup … … 35 35 {{{#!td 36 36 {{{ 37 == Level 2 ==37 == Level 2 38 38 === Level 3 ^([#hn note])^ 39 39 }}} 40 40 }}} 41 41 {{{#!td style="padding-left: 2em" 42 == Level 2 ==42 == Level 2 43 43 === Level 3 ^([#hn note])^ 44 44 }}} … … 63 63 {{{#!td 64 64 {{{ 65 * bullet slist65 * bullet list 66 66 on multiple lines 67 67 1. nested list … … 71 71 }}} 72 72 {{{#!td 73 * bullet slist73 * bullet list 74 74 on multiple lines 75 75 1. nested list … … 287 287 * {{{ ! }}} tells wiki parser to not take the following characters as wiki format, so pay attention to put a space after !, e.g. when ending bold. 288 288 * all the font styles marks have to be used in opening/closing pairs, 289 and they must nest properly (in particular, an `''` italic can't be paired290 with a `//` one, and `'''` can't be paired with `**` )289 and they must nest properly; in particular, an `''` italic can't be paired 290 with a `//` one, and `'''` can't be paired with `**`. 291 291 292 292 == Headings … … 295 295 296 296 [=#hn] 297 The headline text can be followed by the same number of "=" characters, but this is no longer mandatory.297 The headline text can be followed by the same number of "=" characters, but this is not mandatory. That is, `=== Section3 ===` is identical to `=== Section3`. 298 298 299 299 Finally, the heading might optionally be followed by an explicit id. If not, an implicit but nevertheless readable id will be generated. … … 468 468 == Discussion Citations 469 469 470 To delineate a citation in an ongoing discussion thread, such as the ticket comment area, e -mail-like citation marks (">", ">>", etc.) may be used.470 To delineate a citation in an ongoing discussion thread, such as the ticket comment area, email-like citation marks (">", ">>", etc.) may be used. 471 471 472 472 ||= Wiki Markup =||= Display =|| … … 580 580 === Complex Tables 581 581 582 If the possibilities offered by the simple "pipe"-based markup for tables described above are not enough for your needs, you can create more elaboratedtables by using [#Processors-example-tables WikiProcessor based tables].582 If the possibilities offered by the simple pipe-based markup ('||') for tables described above are not enough for your needs, you can create more elaborate tables by using [#Processors-example-tables WikiProcessor based tables]. 583 583 584 584 == Links 585 585 586 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark "!" character, such as {{{!WikiPageLink}}}.586 Hyperlinks are automatically created for WikiPageNames and URLs. !WikiPageLinks can be disabled by prepending an exclamation mark ('!'), such as {{{!WikiPageLink}}}. 587 587 588 588 ||= Wiki Markup =||= Display =|| … … 682 682 }}} 683 683 684 It 's also very close to the syntax for the corresponding link to that anchor:684 It is also very close to the syntax for the corresponding link to that anchor: 685 685 {{{ 686 686 [#point1] … … 711 711 }}} 712 712 713 For more complex anchors (e .g. when a custom title is wanted), one can use the Span macro, e.g.`[[span(id=point2, class=wikianchor, title=Point 2, ^(2)^)]]`.713 For more complex anchors (eg when a custom title is wanted), you can use the Span macro: `[[span(id=point2, class=wikianchor, title=Point 2, ^(2)^)]]`. 714 714 715 715 == Escaping Links, WikiPageNames and other Markup == #Escaping 716 716 717 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single "!" (exclamation mark).717 You may avoid making hyperlinks out of TracLinks by preceding an expression with a single exclamation mark ('!'). 718 718 719 719 ||= Wiki Markup =||= Display =|| … … 941 941 Your comment for editors here 942 942 }}} 943 see ;-)943 see. 944 944 }}} 945 945 }}} … … 950 950 Your comment for editors here 951 951 }}} 952 see ;-)952 see. 953 953 }}} 954 954 955 955 == Miscellaneous 956 956 957 An horizontal line can be used to separated different parts of your page: 958 959 ||= Wiki Markup =||= Display =|| 960 {{{#!td 957 ||= Wiki Markup =||= Display =|| 958 {{{#!td 959 Horizontal line: 961 960 {{{ 962 961 Four or more dashes will be replaced 963 by a nhorizontal line (<HR>)962 by a horizontal line (<HR>) 964 963 ---- 965 964 See? … … 968 967 {{{#!td 969 968 Four or more dashes will be replaced 970 by a nhorizontal line (<HR>)969 by a horizontal line (<HR>) 971 970 ---- 972 971 See? … … 974 973 |---------------------------------- 975 974 {{{#!td 976 {{{ 977 "macro" style [[br]] line break 978 }}} 979 }}} 980 {{{#!td 981 "macro" style [[br]] line break 975 Two examples of line breaks: 976 {{{ 977 "macro" style [[BR]] line break 978 }}} 979 or: 980 {{{ 981 !WikiCreole style \\ line\\break 982 }}} 983 }}} 984 {{{#!td 985 "macro" style [[BR]] line break 986 987 !WikiCreole style \\ line\\break 982 988 }}} 983 989 |---------------------------------- 984 {{{#!td985 {{{986 !WikiCreole style \\ line\\break987 }}}988 }}}989 {{{#!td990 !WikiCreole style \\ line\\break991 }}} -
wiki/pages/WikiMacros
r40558 r43921 1 1 = Trac Macros 2 2 3 [[PageOutline ]]3 [[PageOutline(2-5,Contents,pullout)]] 4 4 5 Trac macros are plugins to extend the Trac engine with custom 'functions' written in Python. A macro inserts dynamic HTML data in any context supporting WikiFormatting. Its syntax is `[[macro-name(optional-arguments)]]`.5 '''Trac macros''' extend the Trac engine with custom functionality. Macros are a special type of plugin and are written in Python. A macro inserts dynamic HTML data in any context supporting WikiFormatting. 6 6 7 The WikiProcessors are another kind of macros. They typically deal with alternate markup formats and transformation of larger "blocks" of information, like source code highlighting. They are used for processing the multiline `{{{#!wiki-processor-name ... }}}` blocks. 7 The macro syntax is `[[macro-name(optional-arguments)]]`. 8 9 '''WikiProcessors''' are another kind of macros. They are typically used for source code highlighting, such as `!#python` or `!#apache` and when the source code spans multiple lines, such as: 10 11 {{{ 12 {{{#!wiki-processor-name 13 ... 14 }}} 15 }}} 8 16 9 17 == Using Macros 10 18 11 Macro calls are enclosed in two ''square brackets'' `[[..]]`. Like Python functions, macros can also have arguments,a comma separated list within parentheses `[[..(,)]]`.19 Macro calls are enclosed in double-square brackets `[[..]]`. Like Python functions, macros can have arguments, which is then a comma separated list within parentheses `[[..(,)]]`. 12 20 13 21 === Getting Detailed Help … … 49 57 {{{#!td style="padding-left: 2em" 50 58 {{{#!html 51 <div style="font-size: 80%"class="trac-macrolist">59 <div class="trac-macrolist"> 52 60 <h3><code>[[Image]]</code></h3>Embed an image in wiki-formatted text. 53 61 54 The first argument is the file …62 The first argument is the file, as in <code>[[Image(filename.png)]]</code> 55 63 <h3><code>[[InterTrac]]</code></h3>Provide a list of known <a class="wiki" href="/wiki/InterTrac">InterTrac</a> prefixes. 56 64 <h3><code>[[InterWiki]]</code></h3>Provide a description list for the known <a class="wiki" href="/wiki/InterWiki">InterWiki</a> prefixes. 57 65 <h3><code>[[KnownMimeTypes]]</code></h3>List all known mime-types which can be used as <a class="wiki" href="/wiki/WikiProcessors">WikiProcessors</a>. 58 Can be …</div>66 </div> 59 67 }}} 60 68 etc. … … 69 77 == Macros from around the world 70 78 71 The [http://trac-hacks.org/ Trac Hacks] site provides a wide collection of macros and other Trac [TracPlugins plugins] contributed by the Trac community. If you are looking for new macros, or have written one that you would like to share with the world, don't hesitate tovisit that site.79 The [http://trac-hacks.org/ Trac Hacks] site provides a wide collection of macros and other Trac [TracPlugins plugins] contributed by the Trac community. If you are looking for new macros, or have written one that you would like to share, please visit that site. 72 80 73 81 == Developing Custom Macros … … 77 85 For more information about developing macros, see the [trac:TracDev development resources] on the main project site. 78 86 79 Here are 2 simple examples showing how to create a Macro. Also, have a look at [trac:source:tags/trac-1.0.2/sample-plugins/Timestamp.py Timestamp.py] for an example that shows the difference between old style and new style macros and at the [trac:source:tags/trac-0.11/wiki-macros/README macros/README] which provides a littlemore insight about the transition.87 Here are 2 simple examples showing how to create a Macro. Also, have a look at [trac:source:tags/trac-1.0.2/sample-plugins/Timestamp.py Timestamp.py] for an example that shows the difference between old style and new style macros and at the [trac:source:tags/trac-0.11/wiki-macros/README macros/README] which provides more insight about the transition. 80 88 81 89 === Macro without arguments 82 90 83 To test the following code, you should savedit in a `timestamp_sample.py` file located in the TracEnvironment's `plugins/` directory.84 {{{ 85 #!python91 To test the following code, save it in a `timestamp_sample.py` file located in the TracEnvironment's `plugins/` directory. 92 93 {{{#!python 86 94 from datetime import datetime 87 95 # Note: since Trac 0.11, datetime objects are used internally … … 105 113 === Macro with arguments 106 114 107 To test the following code, you shouldsave it in a `helloworld_sample.py` file located in the TracEnvironment's `plugins/` directory.108 {{{ 109 #!python115 To test the following code, save it in a `helloworld_sample.py` file located in the TracEnvironment's `plugins/` directory. 116 117 {{{#!python 110 118 from genshi.core import Markup 111 119 … … 143 151 }}} 144 152 145 Note that `expand_macro` optionally takes a 4^th^ parameter ''`args`''. When the macro is called as a [WikiProcessors WikiProcessor], it 's also possible to pass `key=value` [WikiProcessors#UsingProcessors processor parameters]. If given, those are stored in a dictionary and passed in this extra `args` parameter. On the contrary, when called as a macro, `args` is`None`. (''since 0.12'').153 Note that `expand_macro` optionally takes a 4^th^ parameter ''`args`''. When the macro is called as a [WikiProcessors WikiProcessor], it is also possible to pass `key=value` [WikiProcessors#UsingProcessors processor parameters]. If given, those are stored in a dictionary and passed in this extra `args` parameter. In the other case, when called as a macro, `args` is `None`. (''since 0.12''). 146 154 147 155 For example, when writing: … … 157 165 [[HelloWorld(<Hello World!>)]] 158 166 }}} 167 159 168 One should get: 160 169 {{{ 161 Hello World, text = <Hello World!> 162 Hello World, text = <Hello World!> 163 Hello World, text = <Hello World!> 170 Hello World, text = <Hello World!>, args = {'style': u'polite', 'silent': False, 'verbose': True} 171 Hello World, text = <Hello World!>, args = {} 172 Hello World, text = <Hello World!>, args = None 164 173 }}} 165 174 166 Note that the return value of `expand_macro` is '''not''' HTML escaped. Depending on the expected result, you should escape it by yourself (using `return Markup.escape(result)`) or, if this is indeed HTML, wrap it in a Markup object (`return Markup(result)`) with `Markup` coming from Genshi, (`from genshi.core import Markup`).175 Note that the return value of `expand_macro` is '''not''' HTML escaped. Depending on the expected result, you should escape it yourself (using `return Markup.escape(result)`) or, if this is indeed HTML, wrap it in a Markup object (`return Markup(result)`) with `Markup` coming from Genshi (`from genshi.core import Markup`). 167 176 168 177 You can also recursively use a wiki Formatter (`from trac.wiki import Formatter`) to process the `text` as wiki markup: 169 178 170 {{{ 171 #!python 179 {{{#!python 172 180 from genshi.core import Markup 173 181 from trac.wiki.macros import WikiMacroBase -
wiki/pages/WikiNewPage
r40558 r43921 2 2 [[TracGuideToc]] 3 3 4 Note: make sure you actually have the rights to edit wiki pages. If you don't see the **Edit this page** button, read the information relative to the editing policy for your Trac installation (usually on the front page WikiStart), or contact your local Trac administrator. 4 You can create a new wiki page by typing the CamelCase name of the page in the quick-search field at the top of the page, or by trying to view a wiki page of that name. Note that a page is "orphaned" by default until it is linked to from another page. 5 5 6 1. Choose a name for your new page. See WikiPageNames for naming conventions. 7 2. Edit an existing page (or any other resources that support WikiFormatting and add a [TracLinks link] to your new page. Save your changes. 8 3. Follow the link you created to take you to the new page. Trac will display a "describe !PageName here" message. 9 4. Click the "Edit this page" button to edit and add content to your new page. Save your changes. 10 5. All done. Your new page is published. 6 You must be granted permission to create wiki pages. If you don't see the **Create this page** button when visiting a non-existent wiki page, you lack appropriate permission. Contact your local Trac administrator for more information. 11 7 12 You can skip the second step by entering the CamelCase name of the page in the quick-search field at the top of the page. But note that the page will effectively be "orphaned" unless you link to it from somewhere else. 8 A new wiki page can also be created as follows: 9 10 1. Choose a name for your new page. See WikiPageNames for naming conventions. 11 1. Edit an existing page or any other resource that support WikiFormatting and add a [TracLinks link] to your new page. If your page name is CamelCase, you can simply type the page name, provided the [TracIni#wiki-section ignore_missing_pages option] is `disabled` (the default). 12 1. Save your changes. 13 1. Follow the link you created to take you to the new page. 14 1. Click the **Create this page** button to enter edit mode and add content to your new page. 15 1. Save your changes to publish your page. 13 16 14 17 == Rename a page #renaming 15 18 16 While picking up good WikiPageNames is important, you can always change your mind 17 and rename the page later. 19 While choosing a good [WikiPageNames page name] is important for usability purposes, you can always rename the page later. You will need the WIKI_RENAME permission to rename pages. 18 20 19 You'll need to ask for the WIKI_RENAME permission in order to be allowed to do this. 20 When renaming a page, you'll be offered the possibility to create a redirection page, so that links pointing to the old location will not be left dangling. 21 When renaming a page, you'll be offered the possibility to create a page at the old location that contains a link to the new page, so that links pointing to the old location are not "dangling" (i.e. pointing to a non-existent page). 21 22 22 23 ---- -
wiki/pages/WikiPageNames
r40558 r43921 19 19 and with a label: [wiki:"Space Matters" all about white space] 20 20 * or simply: ["WikiPageName"]s 21 * even better, the new[[WikiCreole link style]]21 * even better, the [[WikiCreole link style]] 22 22 and with a label: [[WikiCreole link style|WikiCreole style links]] 23 23 }}} … … 29 29 and with a label: [wiki:"Space Matters" all about white space] 30 30 * or simply: ["WikiPageName"]s 31 * even better, the new[[WikiCreole link style]]31 * even better, the [[WikiCreole link style]] 32 32 and with a label: [[WikiCreole link style|WikiCreole style links]] 33 33 34 34 It is possible to link to a specific ''version'' of a Wiki page as you would do for a specific version of a file, for example: WikiStart@1. 35 35 36 You can alsoprevent a !CamelCase name from being interpreted as a [TracLinks link] by quoting it with an exclamation mark: `!CamelCase`. See TracLinks#EscapingLinks.36 You can prevent a !CamelCase name from being interpreted as a [TracLinks link] by quoting it with an exclamation mark: `!CamelCase`. See TracLinks#EscapingLinks. 37 37 38 As in the example above, you can also append an anchor to a Wiki page name to link to a specific section within that page. The anchor can be seen by hovering the mouse over a section heading, then clicking on the [[html(¶)]] sign that appears at its end. The anchor is usually generated automatically, but it is also possible to specify it explicitly: see WikiFormatting#using-explicit-id-in-heading. 38 As in the example above, you can append an anchor to a Wiki page name to link to a specific section within that page. The anchor can be seen by hovering the mouse over a section heading, then clicking on the [[html(¶)]] sign that appears at its end. The anchor is usually generated automatically, but it is also possible to specify it explicitly: see WikiFormatting#using-explicit-id-in-heading. 39 40 There are a few options that govern the rendering of WikiPageNames: 41 * CamelCase linking to missing pages can be disabled with the `ignore_missing_pages` [https://trac.edgewall.org/wiki/TracIni#wiki-section option]. Linking to missing pages is enabled by default. 42 * The `split_page_names` option, when enabled, will split CamelCase words when rendering a link. For example, WikiStart will be rendered as [WikiStart Wiki Start]. 39 43 40 44 ---- -
wiki/pages/WikiProcessors
r40558 r43921 6 6 - [#CodeHighlightingSupport syntax highlighting] or for rendering text verbatim 7 7 - rendering [#HTMLrelated Wiki markup inside a context], like inside <div> blocks or <span> or within <td> or <th> table cells 8 - using an alternative markup syntax, like [ wiki:WikiHtml raw HTML] and [wiki:WikiRestructuredText Restructured Text] or [http://www.textism.com/tools/textile/ textile]8 - using an alternative markup syntax, like [WikiHtml raw HTML] and [WikiRestructuredText Restructured Text] or [http://www.textism.com/tools/textile/ textile] 9 9 10 10 == Using Processors … … 142 142 The following processors are included in the Trac distribution: 143 143 144 || '''`#!default`''' || Present the text verbatim in a preformatted text block. This is the same as specifying ''no'' processor name (and no `#!`) ||144 || '''`#!default`''' || Present the text verbatim in a preformatted text block. This is the same as specifying ''no'' processor name (and no `#!`). || 145 145 || '''`#!comment`''' || Do not process the text in this section, i.e. contents exist only in the plain text - not in the rendered page. || 146 || '''`#!rtl`''' || Introduce a Right-To-Left block with appropriate CSS direction and styling ''(since 0.12.2)'' ||146 || '''`#!rtl`''' || Introduce a Right-To-Left block with appropriate CSS direction and styling. ''(since 0.12.2)'' || 147 147 |||| || 148 148 ||||= '''[=#HTMLrelated HTML related]''' =|| 149 149 || '''`#!html`''' || Insert custom HTML in a wiki page. || 150 || '''`#!htmlcomment`''' || Insert an HTML comment in a wiki page (''since 0.12'').||150 || '''`#!htmlcomment`''' || Insert an HTML comment in a wiki page. (''since 0.12'') || 151 151 || || Note that `#!html` blocks have to be ''self-contained'', i.e. you can't start an HTML element in one block and close it later in a second block. Use the following processors for achieving a similar effect. || 152 || '''`#!div`''' || Wrap an arbitrary Wiki content inside a <div> element (''since 0.11''). ||153 || '''`#!span`''' || Wrap an arbitrary Wiki content inside a <span> element (''since 0.11''). ||154 || '''`#!td`''' || Wrap an arbitrary Wiki content inside a <td> element(''since 0.12'') ||155 || '''`#!th`''' || Wrap an arbitrary Wiki content inside a <th> element(''since 0.12'') ||156 || '''`#!tr`''' || Can optionally be used for wrapping `#!td` and `#!th` blocks, either for specifying row attributes or better visual grouping (''since 0.12'') ||152 || '''`#!div`''' || Wrap wiki content inside a <div> element. || 153 || '''`#!span`''' || Wrap wiki content inside a <span> element. || 154 || '''`#!td`''' || Wrap wiki content inside a <td> element. (''since 0.12'') || 155 || '''`#!th`''' || Wrap wiki content inside a <th> element. (''since 0.12'') || 156 || '''`#!tr`''' || Can optionally be used for wrapping `#!td` and `#!th` blocks, either for specifying row attributes or better visual grouping. (''since 0.12'') || 157 157 || '''`#!table`''' || Can optionally be used for wrapping `#!tr`, `#!td` and `#!th` blocks, for specifying table attributes. One current limitation however is that tables cannot be nested. (''since 0.12'') || 158 158 || || See WikiHtml for example usage and more details about these processors. || … … 163 163 |||| || 164 164 ||||= '''[=#CodeHighlightingSupport Code Highlighting Support]''' =|| 165 || '''`#!c`''' [[BR]] '''`#!cpp`''' (C++) [[BR]] '''`#!python`''' [[BR]] '''`#!perl`''' [[BR]] '''`#!ruby`''' [[BR]] '''`#!php`''' [[BR]] '''`#!asp`''' [[BR]] '''`#!java`''' [[BR]] '''`#!js`''' (Javascript) [[BR]] '''`#!sql`''' [[BR]] '''`#!xml`''' (XML or HTML) [[BR]] '''`#!sh`''' (!Bourne/Bash shell) [[BR]] '''etc.''' [[BR]] || Trac includes processors to provide inline syntax highlighting for source code in various languages. [[BR]] [[BR]] Trac relies on external software packages for syntax coloring, like [http://pygments.org Pygments]. [[BR]] [[BR]] See TracSyntaxColoring for information about which languages are supported and how to enable support for more languages. ||166 |||| || 167 168 Since 1.1.2 the default, coding highlighting and MIME-type processors support the argument `lineno` for adding line numbering to the code block. When a value is specified, as in `lineno=3`, the numbering will start at the specified value. When used in combination with the `lineno` argument, the `marks` argument is also supported for highlighting lines. A single line number, set of line numbers and range of line numbers are allowed. For example, `marks=3`, `marks=3-6`, `marks=3,5,7` and `marks=3-5,7` are all allowed. The specified values are relative to the numbered lines, so if `lineno=2` is specified to start the line numbering at 2, `marks=2` will result in the first line being highlighted. 165 || '''`#!c`''' [[BR]] '''`#!cpp`''' (C++) [[BR]] '''`#!python`''' [[BR]] '''`#!perl`''' [[BR]] '''`#!ruby`''' [[BR]] '''`#!php`''' [[BR]] '''`#!asp`''' [[BR]] '''`#!java`''' [[BR]] '''`#!js`''' (Javascript) [[BR]] '''`#!sql`''' [[BR]] '''`#!xml`''' (XML or HTML) [[BR]] '''`#!sh`''' (!Bourne/Bash shell) [[BR]] '''etc.''' [[BR]] || Trac includes processors to provide inline syntax highlighting for source code in various languages. [[BR]] [[BR]] Trac relies on [http://pygments.org Pygments] for syntax coloring. [[BR]] [[BR]] See TracSyntaxColoring for information about which languages are supported and how to enable support for more languages. || 166 |||| || 167 168 Since 1.1.2 the default, coding highlighting and MIME-type processors support the argument `lineno` for adding line numbering to the code block. When a value is specified, as in `lineno=3`, the numbering will start at the specified value. When used in combination with the `lineno` argument, the `marks` argument is also supported for highlighting lines. A single line number, set of line numbers and range of line numbers are allowed. For example, `marks=3`, `marks=3-6`, `marks=3,5,7` and `marks=3-5,7` are all allowed. The specified values are relative to the numbered lines, so if `lineno=2` is specified to start the line numbering at 2, `marks=2` will result in the first line being highlighted. 169 169 170 170 Using the MIME type as processor, it is possible to syntax-highlight the same languages that are supported when browsing source code. … … 175 175 Some examples: 176 176 {{{ 177 {{{ 178 #!text/html 177 {{{#!text/html 179 178 <h1>text</h1> 180 179 }}} … … 183 182 {{{#!td 184 183 The result will be syntax highlighted HTML code: 184 {{{#!text/html 185 <h1>text</h1> 186 }}} 187 188 The same is valid for all other [TracSyntaxColoring#SyntaxColoringSupport mime types supported]. 189 }}} 190 }}} 191 {{{#!td 185 192 {{{ 186 #!text/html 187 <h1>text</h1> 188 }}} 189 190 The same is valid for all other [TracSyntaxColoring#SyntaxColoringSupport mime types supported]. 191 }}} 192 }}} 193 {{{#!td 194 {{{ 195 {{{ 196 #!diff 193 {{{#!diff 197 194 --- Version 55 198 195 +++ Version 56 … … 215 212 {{{#!td 216 213 '''`#!diff`''' has a particularly nice renderer: 217 {{{ 218 #!diff 214 {{{#!diff 219 215 --- Version 55 220 216 +++ Version 56 … … 273 269 }}} 274 270 275 For more processor macros developed and/or contributed by users, visit the [ th:WikiStartTrac Hacks] community site.271 For more processor macros developed and/or contributed by users, visit the [https://trac-hacks.org Trac Hacks] community site. 276 272 277 273 Developing processors is no different from Wiki macros. In fact, they work the same way, only the usage syntax differs. See WikiMacros#DevelopingCustomMacros for more information. -
wiki/pages/WikiRestructuredText
r40558 r43921 1 = reStructuredText Support in Trac = 1 = reStructuredText Support in Trac 2 3 == Introduction 4 2 5 3 6 Trac supports [http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html reStructuredText (RST)] as an alternative to wiki markup where WikiFormatting is used. 4 7 5 8 From the reStucturedText webpage: 6 " ''reStructuredText is an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser system. It is useful for in-line program documentation (such as Python docstrings), for quickly creating simple web pages, and for standalone documents. reStructuredText is designed for extensibility for specific application domains. ''"7 8 If you want a file from your Subversion repository to be displayed as reStructuredText in the Trac source browser, set `text/x-rst` as the value for the Subversion property `svn:mime-type` . See [trac:source:/trunk/INSTALLthis example].9 10 === Requirements === 11 To activate RST support in Trac, install the python docutils package: `easy_install docutils`. If not already available on your operating system, you can download it at the [http://docutils.sourceforge.net/rst.html RST Website]. 12 13 Do not use the package manager of your OS, eg `apt-get install python-docutils`, because Trac will not find docutils then. 14 15 === More information on RST === 16 17 * reStructuredText Website -- http://docutils.sourceforge.net/rst.html 18 * RST Quick Reference -- http://docutils.sourceforge.net/docs/rst/quickref.html19 20 ---- 21 22 == Using RST in Trac == 9 "reStructuredText is an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser system. It is useful for in-line program documentation (such as Python docstrings), for quickly creating simple web pages, and for standalone documents. reStructuredText is designed for extensibility for specific application domains." 10 11 If you want a file from your Subversion repository to be displayed as reStructuredText in the Trac source browser, set `text/x-rst` as the value for the Subversion property `svn:mime-type`, or add the extension `rst` to the filename. See [trac:source:/trunk/INSTALL.rst this example]. 12 13 The examples will only be rendered as reStructuredText if docutils is installed. If Pygments is installed but docutils is not installed, the examples will be syntax-highlighted rather than rendered as reStructuredText. 14 15 === Requirements 16 17 To activate RST support in Trac, install the python docutils package with the command `easy_install docutils`, or through your operating system package manager. If not already available on your operating system, you can download it from [https://pypi.python.org/pypi/docutils PyPI]. 18 19 === More information on RST 20 21 * [http://docutils.sourceforge.net/rst.html reStructuredText Website] 22 * [http://docutils.sourceforge.net/docs/rst/quickref.html RST Quick Reference] 23 24 == Using RST in Trac 25 23 26 To specify that a block of text should be parsed using RST, use the ''rst'' processor. 24 27 25 === TracLinks in reStructuredText ===28 === TracLinks in reStructuredText 26 29 27 30 * Trac provides a custom RST directive `trac::` to allow TracLinks from within RST text. … … 29 32 {{{#!td 30 33 {{{ 34 {{{#!rst 35 This is a reference to |a ticket| 36 37 .. |a ticket| trac:: #42 38 }}} 39 }}} 40 }}} 41 {{{#!td 42 {{{#!rst 43 This is a reference to |a ticket| 44 45 .. |a ticket| trac:: #42 46 }}} 47 }}} 48 49 * You can also use the custom `:trac:` role to create TracLinks in RST. 50 ||= Wiki Markup ||= Display || 51 {{{#!td 31 52 {{{ 32 #!rst 33 This is a reference to |a ticket| 34 35 .. |a ticket| trac:: #42 36 }}} 37 }}} 38 }}} 39 {{{#!td 40 {{{ 41 #!rst 42 This is a reference to |a ticket| 43 44 .. |a ticket| trac:: #42 45 }}} 46 }}} 47 48 * Trac allows an even easier way of creating TracLinks in RST, using the custom `:trac:` role. 49 ||= Wiki Markup ||= Display || 50 {{{#!td 51 {{{ 52 {{{ 53 #!rst 53 {{{#!rst 54 54 This is a reference to ticket `#12`:trac: 55 55 … … 59 59 }}} 60 60 {{{#!td 61 {{{ 62 #!rst 61 {{{#!rst 63 62 This is a reference to ticket `#12`:trac: 64 63 … … 67 66 }}} 68 67 69 For a complete example of all uses of the `:trac:` role, pleasesee WikiRestructuredTextLinks.70 71 === Syntax highlighting in reStructuredText ===68 For a complete example of all uses of the `:trac:` role, see WikiRestructuredTextLinks. 69 70 === Syntax highlighting in reStructuredText 72 71 73 72 There is a directive for doing TracSyntaxColoring in RST as well. The directive is called code-block: … … 76 75 {{{#!td 77 76 {{{ 78 {{{ 79 #!rst 77 {{{#!rst 80 78 81 79 .. code-block:: python … … 90 88 }}} 91 89 {{{#!td 92 {{{ 93 #!rst 90 {{{#!rst 94 91 95 92 .. code-block:: python … … 104 101 Note the need to indent the code at least one character after the `.. code-block` directive. 105 102 106 === Wiki Macros in reStructuredText === 107 108 To enable [WikiMacros Wiki Macros] in RST, you use the same directive as for syntax highlighting, ie code-block: 103 === Wiki Macros in reStructuredText 104 105 To enable [WikiMacros Wiki Macros] in RST, you use the same `code-block` directive as for syntax highlighting: 106 107 ||= Wiki Markup ||= Display || 108 {{{#!td 109 {{{ 110 {{{#!rst 111 112 .. code-block:: RecentChanges 113 114 Trac,3 115 116 }}} 117 }}} 118 }}} 119 {{{#!td 120 {{{#!rst 121 122 .. code-block:: RecentChanges 123 124 Trac,3 125 126 }}} 127 }}} 128 129 Or use the `:code-block:` role for a more concise Wiki Macro-like syntax: 109 130 110 131 ||= Wiki Markup ||= Display || … … 114 135 #!rst 115 136 116 .. code-block:: RecentChanges117 118 Trac,3119 120 }}}121 }}}122 }}}123 {{{#!td124 {{{125 #!rst126 127 .. code-block:: RecentChanges128 129 Trac,3130 131 }}}132 }}}133 134 Or a more concise Wiki Macro-like syntax is also available, using the `:code-block:` role:135 136 ||= Wiki Markup ||= Display ||137 {{{#!td138 {{{139 {{{140 #!rst141 142 137 :code-block:`RecentChanges:Trac,3` 143 138 }}} … … 145 140 }}} 146 141 {{{#!td 147 {{{ 148 #!rst 142 {{{#!rst 149 143 150 144 :code-block:`RecentChanges:Trac,3` … … 152 146 }}} 153 147 154 === Bigger RST Example === 148 === Bigger RST Example 149 155 150 The example below should be self-explanatory: 156 151 157 152 ||= Wiki Markup ||= Display || 158 153 {{{#!td 159 {{{ 160 #!html 161 <pre class="wiki">{{{ 162 #!rst 154 {{{#!html 155 <pre class="wiki">{{{#!rst 163 156 FooBar Header 164 157 ============= … … 188 181 }}} 189 182 {{{#!td 190 {{{ 191 #!rst 183 {{{#!rst 192 184 FooBar Header 193 185 ============= -
wiki/pages/WikiRestructuredTextLinks
r40558 r43921 4 4 5 5 {{{ 6 {{{ 7 #!rst 6 {{{#!rst 8 7 Examples: 9 8 … … 29 28 Provided you have [http://docutils.sourceforge.net/ docutils] installed, the above block will render as: 30 29 ---- 31 {{{ 32 #!rst 30 {{{#!rst 33 31 Examples: 34 32 … … 54 52 Note that the above could have been written using substitution references and the `trac::` directive: 55 53 {{{ 56 {{{ 57 #!rst 54 {{{#!rst 58 55 See |ticket123|. 59 56 … … 65 62 ---- 66 63 67 {{{ 68 #!rst 64 {{{#!rst 69 65 See |ticket123|. 70 66 -
wiki/pages/WikiStart
r40558 r43921 1 [[TranslatedPages]] 2 {{{#!div align=center style="border: none; font-size: 300%" 3 Willkommen im TitanNit Projekt[[br]]Welcome to the TitanNit Project 4 }}} 5 ---- 1 = Welcome to Trac 1.2 6 2 7 {{{#!div align=center style="border: none; font-size: 115%" 8 [=#point0]'''Bitte wählen Sie Ihre Sprache: \ please select your language''' : 3 Trac is a '''minimalistic''' approach to '''web-based''' management of 4 '''software projects'''. Its goal is to simplify effective tracking and 5 handling of software issues, enhancements and overall progress. 9 6 10 ||= '''[wiki:de/Wiki#point0 Deutsch]''' =||= '''[wiki:en/Wiki#point0 English]''' =||= '''[wiki:fr/Wiki#point0 Français]''' =||= '''[wiki:gr/Wiki#point0 ελληνικός]''' =||= '''[wiki:it/Wiki#point0 Italiano]''' =||= '''[wiki:nl/Wiki#point0 Nederlands]''' =||= '''[wiki:pl/Wiki#point0 Polski]''' =||= '''[wiki:ru/Wiki#point0 Русский]''' =||= '''[wiki:vn/Wiki#point0 Vietnam]''' =|| 11 ||= [[Image(source:/wiki/Wiki-Pictures/DE/de.png,link=wiki:de/Wiki#point0)]] =||= [[Image(source:/wiki/Wiki-Pictures/EN/en.png,link=wiki:en/Wiki#point0))]] =||= [[Image(source:/wiki/Wiki-Pictures/FR/fr.png,link=wiki:fr/Wiki#point0))]] =||= [[Image(source:/wiki/Wiki-Pictures/GR/gr.png,link=wiki:gr/Wiki#point0))]] =||= [[Image(source:/wiki/Wiki-Pictures/IT/it.png,link=wiki:it/Wiki#point0))]] =||= [[Image(source:/wiki/Wiki-Pictures/NL/nl.png,link=wiki:nl/Wiki#point0))]] =||= [[Image(source:/wiki/Wiki-Pictures/PL/pl.png,link=wiki:pl/Wiki#point0))]] =||= [[Image(source:/wiki/Wiki-Pictures/RU/ru.png,link=wiki:ru/Wiki#point0))]] =||= [[Image(source:/wiki/Wiki-Pictures/VN/vn.png,link=wiki:vn/Wiki#point0))]] =|| 12 [[br]] 13 [[br]] 14 }}} 7 All aspects of Trac have been designed with the single goal to 8 '''help developers write great software''' while '''staying out of the way''' 9 and imposing as little as possible on a team's established process and 10 culture. 11 12 As all Wiki pages, this page is editable, this means that you can 13 modify the contents of this page simply by using your 14 web-browser. Simply click on the "Edit this page" link at the bottom 15 of the page. WikiFormatting will give you a detailed description of 16 available Wiki formatting commands. 17 18 "[wiki:TracAdmin trac-admin] ''yourenvdir'' initenv" created 19 a new Trac environment, containing a default set of wiki pages and some sample 20 data. This newly created environment also contains 21 [wiki:TracGuide documentation] to help you get started with your project. 22 23 You can use [wiki:TracAdmin trac-admin] to configure 24 [http://trac.edgewall.org/ Trac] to better fit your project, especially in 25 regard to ''components'', ''versions'' and ''milestones''. 15 26 16 27 28 TracGuide is a good place to start. 17 29 18 ''' [wiki:TitleIndex#point Title Index] '''[[br]] 19 '''[wiki:Wiki-Help-Contents#point0 Wiki Help Contents]''' 30 Enjoy! [[BR]] 31 ''The Trac Team'' 32 33 == Starting Points 34 35 * TracGuide -- Built-in Documentation 36 * [http://trac.edgewall.org/ The Trac project] -- Trac Open Source Project 37 * [http://trac.edgewall.org/wiki/TracFaq Trac FAQ] -- Frequently Asked Questions 38 * TracSupport -- Trac Support 39 40 For a complete list of local wiki pages, see TitleIndex.
Note: See TracChangeset
for help on using the changeset viewer.