grok.template doesn't complain if the given template does not exist
Bug #225855 reported by
Christian Theune
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grok |
Fix Committed
|
Medium
|
Reinout van Rees | ||
1.0 |
Won't Fix
|
Medium
|
Reinout van Rees | ||
1.1 |
Fix Committed
|
Medium
|
Martijn Faassen |
Bug Description
I made the following mistake (appending .pt to the template name but asdf.pt exists):
class Foo(grok.View):
grok.
and received the following error message:
zope.configurat
This should say that template 'asdf' doesn't exist.
Changed in grok: | |
assignee: | nobody → janwijbrand |
milestone: | none → 1.0 |
Changed in grok: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
To post a comment you must log in.
The latest grokcore.view splitted View into View and CodeView. View always needs a template, so the error message is already much clearer as it doesn't need to take a render() into account.
Instead of "no associated template or render method" you only get "has no associated template". (With the freshly released grokcore.view that's going to be in 1.0beta1).
It can be made more clear if grokcore/ view/templatere g.py is modified to keep track whether there's a grok.template setting and to return that in the error message when applicable.
So: partially fixed, but needs a bit of improvement.