from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^polls/', include('polls.urls')),
    url(r'^admin/', admin.site.urls),
]

from django.conf.urls import include, url
from django.contrib import admin
from django.http.response import HttpResponseRedirect

urlpatterns = [
    url(r'^polls/', include('polls.urls')),
    url(r'^admin/', admin.site.urls),
    url(r'^$', lambda r: HttpResponseRedirect('polls/')),
]

Add redirect from / to /polls
Add redirect from / to /polls

  from django.conf.urls import include, url
  from django.contrib import admin
+ from django.http.response import HttpResponseRedirect
  
  urlpatterns = [
      url(r'^polls/', include('polls.urls')),
      url(r'^admin/', admin.site.urls),
+     url(r'^$', lambda r: HttpResponseRedirect('polls/')),
  ]
  
Add redirect from / to /polls
## Code Before:
from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^polls/', include('polls.urls')),
    url(r'^admin/', admin.site.urls),
]

## Instruction:
Add redirect from / to /polls
## Code After:
from django.conf.urls import include, url
from django.contrib import admin
from django.http.response import HttpResponseRedirect

urlpatterns = [
    url(r'^polls/', include('polls.urls')),
    url(r'^admin/', admin.site.urls),
    url(r'^$', lambda r: HttpResponseRedirect('polls/')),
]
