id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 29664,Need Proper error handling for CBV in urls.,Amar,emiamar@…,"When in urls.py if one misses to call `as_view()` (Example shown below) method django throws weird error. Need better way of handling error Incorrect definition {{{ urlpatterns = [ path('admin/', admin.site.urls), path('hello/', HelloView) ] }}} Correct definition {{{ urlpatterns = [ path('admin/', admin.site.urls), path('hello/', HelloView.as_view()) ] }}} Error {{{ TypeError at /hello/ __init__() takes 1 positional argument but 2 were given Request Method: GET Request URL: http://localhost:8000/hello/ Django Version: 2.0.7 Exception Type: TypeError Exception Value: __init__() takes 1 positional argument but 2 were given Exception Location: /home/amar/.virtualenvs/djmongo/lib/python3.6/site-packages/django/core/handlers/base.py in _get_response, line 126 }}} This make it really hard to figure out actual error. I faced this once and had to struggle for hours to understand what went wrong. Here is my [https://github.com/django/django/pull/10294 PR] ",Cleanup/optimization,assigned,Core (URLs),2.1,Normal,,,emiamar@…,Unreviewed,0,0,0,0,0,0