I have my url:
url(r'^home/', HomeQuestionView, name='home_question') ,
When I enter localhost:8000/home
I get my homepage but what I want is when I just enter I get my homepage.
I mean I want to redirect to the above homepage url when user enters only my site likewww.xyz.com
not www.xyz.com/home
I dont want to configure in this way
url(r'^', HomeQuestionView, name='home_question') ,
Thanx in advance
Use generic RedirectView:
from django.views.generic.base import RedirectView
url(r'^$', RedirectView.as_view(url='/home/')),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With