Re: Named URLs and class-based generic views

2010-12-03 Thread Andrew Willey
me is that you have to include the whole views.py in your url conf. Just feels less graceful than having the dispatcher nab what it needs on demand. I'll get over it. Unless someone has a better idea! On Dec 3, 3:12 pm, Daniel Roseman wrote: > On Dec 3, 8:47 pm, Andrew Willey wrot

Re: Named URLs and class-based generic views

2010-12-03 Thread Andrew Willey
Forgot to in mention the actual question from the subject. Is there a "blessed" way to use class-based views with named urls in the > url(r'^location/$', view='WouldLoveToHaveClassBasedView.as_view', > name='name_for_convenience') On Dec 3, 1:46 pm

Named URLs and class-based generic views

2010-12-03 Thread Andrew Willey
Can someone point me in the right direction here? How does one use class-based generic views and named URLs? Example (doesn't work): > urls.py > urlpatterns += patterns('myapp.views', >(r'^location/$', MyGenericView.as_view()), > ) > views.py > class MyGenericView(TemplateView): >templa