Mercurial > p > roundup > code
comparison roundup/admin.py @ 4900:349a83aca61f
Correctly locate templates in a virtualenv (issue2550841)
The listTemplates() method looks in a number of locations under
'<venv>/local/' but the setup script installs them under the directory
'<venv>/share/roundup/templates/', so we need to add that to the list of
paths that are looked in for templates.
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Thu, 26 Jun 2014 15:39:19 +1000 |
| parents | 6e9b9743de89 |
| children | 5251e97b1de0 |
comparison
equal
deleted
inserted
replaced
| 4899:d28a648678e7 | 4900:349a83aca61f |
|---|---|
| 303 # /usr/lib/python2.5/site-packages/roundup-1.3.3-py2.5-egg/roundup/admin.py | 303 # /usr/lib/python2.5/site-packages/roundup-1.3.3-py2.5-egg/roundup/admin.py |
| 304 # (2 dirs up) | 304 # (2 dirs up) |
| 305 # | 305 # |
| 306 # we're interested in where the directory containing "share" is | 306 # we're interested in where the directory containing "share" is |
| 307 templates = {} | 307 templates = {} |
| 308 for N in 2, 4, 5: | 308 for N in 2, 4, 5, 6: |
| 309 path = __file__ | 309 path = __file__ |
| 310 # move up N elements in the path | 310 # move up N elements in the path |
| 311 for i in range(N): | 311 for i in range(N): |
| 312 path = os.path.dirname(path) | 312 path = os.path.dirname(path) |
| 313 tdir = os.path.join(path, 'share', 'roundup', 'templates') | 313 tdir = os.path.join(path, 'share', 'roundup', 'templates') |
