turbogears


Turbogears 2.3.10 error kajiki template with pluggable application


I used turbogears 2.3.10 with kajiki template, I created applicantion name samples and created pluggable application name plugapp.
(I see in http://turbogears.readthedocs.io/en/latest/turbogears/Pluggable/index.html?highlight=plugin)
I created package name master_view(templates/master_view) and file master.xhtml in plugapp(pluggable application).
-plugapp
--templates
--master_view
--master.xhtml
--index.xhtml
In index.xhtml of plugapp(pluggable application), I changed
<py:extends href="master.xhtml"/>
to
<py:extends href="master_view/master.xhtml"/>
I run http://localhost:8080/plugapp. it show error
TypeError: coercing to Unicode: need string or buffer, NoneType found .
How do I fix it? thank you.
The error can definitively be better, but what's trying to tell you is that there is no such template as when specified by a relative filename, the templates are looked up inside the templates directory.
Which is the templates directory of the base application (as the base app configuration applies), not the template directory of the pluggable.
As the application where you are plugging the module into has no templates/master_view/master.xhtml file kajiki is unable to load it.
Whenever referring to something contained into a pluggable app, you should use the dotted notation. So that you can refer to the python package of the pluggable app.
In this case you want to create an __init__.py file inside your master_view directory and use py:extends="provaplug.templates.master_view.master" to load the expected master.html file.
As you are explicitly pointing to master_view/master.xhtml contained into the provaplug package (where provaplug is the name of your pluggable app) you will be loading the one of your pluggable app

Related Links

Turbogears 2.3.10 error kajiki template with pluggable application
Exposing an HTTP proxy through a Turbogears controller
Using kajiki in TG2.1
embed multiple kid template files into a main one

Categories

HOME
vim
urbancode
view
electron
rsync
elm
analysis
jsrender
v8
webpack-2
onelogin
autotools
cross-validation
medical
here-api
correlation
ups
foselasticabundle
saxon
pc
django-cms
textfield
autocad-plugin
jquery-ajaxq
web-sql
tapestry
google-search-api
format-specifiers
claims-based-identity
traffic
bluestacks
directx-10
bcd
google-cloud-endpoints-v2
titanium-mobile
fog
caret
avcapturesession
wallpaper
fusionpbx
espeak
webix-treetable
document.write
sas-visual-analytics
fedex
jvm-languages
turbogears
http-redirect
appcompat
jquery-nestable
tizen-native-app
gabor-filter
mplayer
csound
knockout-components
nsarray
django-scheduler
url-pattern
heidisql
rotativa
ado.net-entity-data-model
sts-springsourcetoolsuite
elements
multi-level
ptrace
teamcity-8.0
icu4j
intellij-14
pundit
riak-cs
census
dundas
unity5.2.3
c3
angularjs-ng-click
java.util.concurrent
mdt
rdtsc
internet-connection
html-helper
rdl
intentservice
.aspxauth
jmapviewer
back-stack
hungarian-algorithm
interface-orientation
online-compilation
windows-phone-7.1.1
reddot
xmlspy
hamachi
horizontal-accordion
jmock
nhibernate.search
preference
fixed-width
sef
privilege
spec#
mdac

Resources

Encrypt Message