On 3 December 2010 22:40, Andrew Willey wrote:
> So it works as
>
>> url(r'^location/$', WouldLoveToHaveClassBasedView.as_view(),
>> name='name_for_convenience')
>
> Didn't realize I could just pass the class object. Makes sense.
> Guess I'm getting old and change fearing.
To be clear here - yo
> I think the only thing that's bugging 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.
>
Yeah, it does feel less graceful, doesn't it? That said, there might
be a way, I
So it works as
> url(r'^location/$', WouldLoveToHaveClassBasedView.as_view(),
> name='name_for_convenience')
Didn't realize I could just pass the class object. Makes sense.
Guess I'm getting old and change fearing.
I think the only thing that's bugging me is that you have to include
the whole
On Dec 3, 8:47 pm, Andrew Willey wrote:
> 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')
>
I don't u
On Dec 3, 2:47 pm, Andrew Willey wrote:
> 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')
>
Oh, I see
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, Andrew Willey wrote:
> Can someone point me i
On Dec 3, 1:46 pm, Andrew Willey wrote:
> 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()),
> > )
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
8 matches
Mail list logo