django: access url name pattern in cbv
I would like to map several urls to the same view.
url(r'^foo/', BaseView.as_view(), name='foo'),
url(r'^bar/', BaseView.as_view(), name='bar'),
url(r'^buzz/', BaseView.as_view(), name='buzz'),
Is there anyway in my class based view I can access the name parameters? I
know it's possible to specify it in as_view(). But is there a way around
that extra boilerplate code?
No comments:
Post a Comment