grok.template doesn't complain if the given template does not exist

Bug #225855 reported by Christian Theune on 2008-05-02
Affects Status Importance Assigned to Milestone
Reinout van Rees
Reinout van Rees
Martijn Faassen

Bug Description

I made the following mistake (appending .pt to the template name but exists):

class Foo(grok.View):

and received the following error message:

zope.configuration.config.ConfigurationExecutionError: martian.error.GrokError: View <class ''> has no associated template or 'render' method.

This should say that template 'asdf' doesn't exist.

todd (todd-infrae) on 2008-12-10
Changed in grok:
assignee: nobody → janwijbrand
milestone: none → 1.0
Changed in grok:
importance: Undecided → Medium
status: New → Confirmed
Reinout van Rees (reinout) wrote :

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/ 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.

Reinout van Rees (reinout) wrote :

I was the last one to touch it (together with christian klinger), so I can take a stab at it.

Christian Klinger (cklinger) wrote :

I will pick up this bug again when the new template-registry stuff is merged...

it took a while but... we fixed the issue!

Changed in grok:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers