Saturday, February 22, 2014

Re: Inconsistency in form_class behavior, is this a Django ticket?


On Saturday, February 22, 2014 6:20:35 AM UTC-4:30, Jopr wrote:
I'm wondering whether the following should be a Django ticket and would like your opinion on it. 

When I forget to set a value for 'template_name' using the TemplateMixin it returns a useful exception:
"TemplateResponseMixin requires either a definition of 'template_name' or an implementation of 'get_template_names()'"

Though when I forget to set the form_class while using the FormView, it returns the following unhelpful exception:
"'NoneType' object is not callable"

The behavior doesn't seem consistent to me and a more helpful message would have saved me some trouble. Is it worth creating a ticket for this?
Hello,

I think you can file a ticket on this, should be a quick fix candidate to be included in future releases. Please post here the ticket number after you do.

Regards,
Camilo. 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/17abc946-8f1a-4555-b22d-1e7353278488%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment