Discussion:
Bottle 0.12.3 + jinja2
Frank
2014-02-11 19:05:09 UTC
Permalink
Hi,

After updating to 0.12.3 I got this Deprecation Warning:

/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bottle.py:3233: DeprecationWarning: Absolute template path names are deprecated.
  fname = self.search(name, self.lookup)

In my code I have.

“


from bottle import TEMPLATE_PATH
 
TEMPLATE_PATH.insert(0, ‘/foo/bar/app_name/views’)

@route('/foo/index')
@view('ws', template_lookups=['views'])
def foo_index():
    return {‘foo’: foo}


"

I’ve all templates in ./views but I can’t get this to work as it should
. any tip


Cheers,
-- 
Frank
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
'Felix H' via bottlepy
2014-10-20 20:52:55 UTC
Permalink
Hi,

is debug mode enabled? Got today the same warning. I disabled the debug
mode and now it's working.
It's maybe not the best solution but a beginning?! :)

Best regard!
Post by Frank
Hi,
DeprecationWarning: Absolute template path names are deprecated.
fname = self.search(name, self.lookup)
In my code I have.
“


from bottle import TEMPLATE_PATH
TEMPLATE_PATH.insert(0, ‘/foo/bar/app_name/views’)
@route('/foo/index')
@view('ws', template_lookups=['views'])
return {‘foo’: foo}


"
I’ve all templates in ./views but I can’t get this to work as it should
.
any tip
Cheers,
--
Frank
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
fackler
2014-10-26 23:29:25 UTC
Permalink
I'm seeing the same warning using

bottle.TEMPLATE_PATH[:] = ['./templates']

and

bottle.TEMPLATE_PATH[:] = ['templates']

..local/lib/python2.7/site-packages/bottle.py:3322: DeprecationWarning:
Absolute template path names are deprecated.
fname = self.search(name, self.lookup)
Post by Frank
Hi,
DeprecationWarning: Absolute template path names are deprecated.
fname = self.search(name, self.lookup)
In my code I have.
“


from bottle import TEMPLATE_PATH
TEMPLATE_PATH.insert(0, ‘/foo/bar/app_name/views’)
@route('/foo/index')
@view('ws', template_lookups=['views'])
return {‘foo’: foo}


"
I’ve all templates in ./views but I can’t get this to work as it should
.
any tip
Cheers,
--
Frank
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...