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

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

from django.conf.urls import url
from django.contrib import admin
from django.views.generic.base import RedirectView

urlpatterns = [
    # for now, since there is not yet any public-facing site,
    # redirect base url to admin index page
    url(r'^$', RedirectView.as_view(pattern_name='admin:index')),
    url(r'^admin/', admin.site.urls),
]

Add redirect from site base url to admin index for now
Add redirect from site base url to admin index for now

  from django.conf.urls import url
  from django.contrib import admin
+ from django.views.generic.base import RedirectView
  
  urlpatterns = [
+     # for now, since there is not yet any public-facing site,
+     # redirect base url to admin index page
+     url(r'^$', RedirectView.as_view(pattern_name='admin:index')),
      url(r'^admin/', admin.site.urls),
  ]
  
Add redirect from site base url to admin index for now
## Code Before:
from django.conf.urls import url
from django.contrib import admin

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

## Instruction:
Add redirect from site base url to admin index for now
## Code After:
from django.conf.urls import url
from django.contrib import admin
from django.views.generic.base import RedirectView

urlpatterns = [
    # for now, since there is not yet any public-facing site,
    # redirect base url to admin index page
    url(r'^$', RedirectView.as_view(pattern_name='admin:index')),
    url(r'^admin/', admin.site.urls),
]
