python - Unknown predicate values error while rendering mako template in pyramid -
i getting configurationerror('unknown predicate values: %r' % (kw,)) while rendering mako template. below structure of pyramid project.
my pyramid project tree.
|-- web |-- myweb |-- templates |-- index.mak |-- __init__.py |-- views.py |-- development.ini |-- production.ini
web/myweb/views.py
class main(object): def __init__(self, request): self.request = request def __call__(self): return {}
web/myweb/__init__.py
config.add_route('main', '/', view='myweb.views.main', renderer='index.mako')
this getting error such
raise configurationerror('unknown predicate values: %r' % (kw,)) pyramid.exceptions.configurationexecutionerror: <class pyramid.exceptions.configurationerror'>: unknown predicate values: {'renderer': 'index.mako', 'view': 'myweb.views.main'} in: line 33 of file /home/user/project/web/myweb/__init__.py: renderer='index.mako')
here .ini files
development.ini
[app:myweb] mako.directories = web:myweb:templates
production.ini
[app:myweb] mako.directories = web:myweb:templates
i don't know missing , cause of error.
to state obvious, __init__.py
refers template "index.mako" whereas file called "index.mak".
Comments
Post a Comment