#6008 closed defect (fixed)
multiple projects index page misses Trac information (patch)
Reported by: | salmira | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | low | Milestone: | 0.11 |
Component: | general | Version: | devel |
Severity: | trivial | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When Trac is setup for multiple projects, it is impossible to display any Trac information by changing index.html, because trac variable is not defined for index.html template, as well other vars.
The only available are: the projects variable (the list of projects) and functions defined and value_of - see debug output of locals() (other debug outputs failed) for a custom index.html page:
defined: <function defined at 0x082E1FB0> projects: {'href': '/trac/tr1', 'name': u'Trac1', 'description': u'1st'}{'href': '/trac/tr2', 'name': u'Trac2', 'description': u'2nd'} value_of: <function value_of at 0x084596F0>
Is it posible to add automatic Trac version infornation for this page at least, sa it is shown for each trac environment?
Test System Information:
Apache/2.2.4 (Win32) mod_python/3.3.1 Python/2.5 SVN/1.4.3 Trac/0.11Dev_trunk-r6000
Attachments (0)
Change History (6)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
I have already projects index from the built-in system. It works OK.
I just trying to print out the version of the current Trac installation in the page that lists all my projects. Now I have to (i) either do not print the exact version information, or (ii) put the version into index.html template manually each time I upgrade the Trac.
TracForge looks interesting, but right now I do not have enough time to setup it and to change policies of all existing active projects. Moreover, TracForge is partially fucntional yet (there is no support for attachments yet)…
comment:3 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Summary: | multiple projects index page misses Trac information → multiple projects index page misses Trac information (patch) |
Patch: the following code adds Trac version information to index.html. Just add it after "data()" line in the trac.web.main.py:472 :
data = {} from trac import __version__ data['trac'] = { 'version': __version__, 'time': format_datetime(), }
With this change, it is possible to print out the current Trac version information from the index.html template:
${trac.version}
comment:4 by , 17 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
unfortunately, I cannot commit this small change to this SVN…
comment:6 by , 17 years ago
Priority: | normal → low |
---|---|
Severity: | normal → trivial |
What are you trying to do exactly? You may find the TracForge index suits your needs better.