Forums

how to redirect page in django in class based view..?

hi... i m new in django but ..m trying to redirect page its not working..

my urls.py file

urlpatterns = patterns('', url(r'^demo$', views.booknew.as_view(), name='demo'), )

my views.py class booknew(ListView): model = Book template_name = "demo.html"

i did't get any error but not its not redirect..? plz help..?

I don't see any code to do a redirect. Are you sure you mean a redirect?

thanks for your time friend ..but i done that issue by myself...

glad you figured it out! don't hesitate to ask again if there's anything we can help with...