#1915: Mako template path issue (TopLevelLookupException: Cant locate template
for
uri '/t2/templates/test.mak')
------------------------+---------------------------------------------------
Reporter: cd34 | Owner: percious
Type: defect | Status: new
Priority: normal | Milestone: 2.0b1
Component: TurboGears | Version: trunk
Severity: normal | Resolution:
Keywords: mako |
------------------------+---------------------------------------------------
Comment (by cd34):
(1915)davies...@pch1:/var/www$ virtualenv --no-site-packages trac1915
New python executable in trac1915/bin/python
Installing setuptools............done.
(1915)davies...@pch1:/var/www$ cd trac1915/
(1915)davies...@pch1:/var/www/trac1915$ source bin/activate
(trac1915)davies...@pch1:/var/www/trac1915$ easy_install -i
http://www.turbogears.org/2.0/downloads/1.9.7b2/index tg.devtools
Searching for tg.devtools
Reading http://www.turbogears.org/2.0/downloads/1.9.7b2/index/tg.devtools/
Best match: tg.devtools 1.9.7b2
Downloading
http://www.turbogears.org/2.0/downloads/1.9.7b2/tg.devtools-1.9.7b2.tar.gz
Processing tg.devtools-1.9.7b2.tar.gz
[clipped]
(trac1915)davies...@pch1:/var/www/trac1915$ paster quickstart
Enter project name: trac1915
Enter package name [trac1915]:
Do you need authentication and authorization in this project? [yes] no
Selected and implied templates:
tg.devtools#turbogears2 TurboGears 2.0 Standard Quickstart Template
Variables:
auth: False
egg: trac1915
elixir: False
package: trac1915
project: trac1915
sqlalchemy: True
sqlobject: False
tgversion: 1.9.7b2
Creating template turbogears2
Creating directory ./trac1915
[clipped]
(trac1915)davies...@pch1:/var/www/trac1915/trac1915$ paster serve --reload
development.ini
Starting subprocess with file monitor
Starting server in PID 2520.
serving on 0.0.0.0:8080 view at http://127.0.0.1:8080
(trac1915)davies...@pch1:/var/www/trac1915/trac1915/trac1915/templates$
cat test.mak
test
in controllers/root.py
@expose('mako:trac1915.templates.test')
def test(self):
return dict()
From the debug info:
dir '/var/www/trac1915/trac1915/trac1915/templates'
self <mako.lookup.TemplateLookup object at 0x8f75d2c>
srcfile
'/var/www/trac1915/trac1915/trac1915/templates/trac1915/templates/test.mak'
u 'trac1915/templates/test.mak'
uri '/trac1915/templates/test.mak'
view
<< return self.__load(srcfile, uri)
else:
raise exceptions.TopLevelLookupException("Cant locate
template for uri '%s'" % uri)
def adjust_uri(self, uri, relativeto):
>> raise exceptions.TopLevelLookupException("Cant locate template for uri
'%s'" % uri)
TopLevelLookupException: Cant locate template for uri
'/trac1915/templates/test.mak'
The path for srcfile in this case should be:
/var/www/trac1915/trac1915/trac1915/templates
and in the debug you can see that it is:
srcfile
'/var/www/trac1915/trac1915/trac1915/templates/trac1915/templates/test.mak'
As of the latest beta, unless I'm doing something wrong, the bug still
exists.
--
Ticket URL: <http://trac.turbogears.org/ticket/1915#comment:8>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---