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


urlpatterns = [
    url(r'^$', lambda request, *args, **kwargs: HttpResponse()),
    url(r'^admin/', admin.site.urls),
]

from django.urls import re_path
from django.contrib import admin
from django.http import HttpResponse


urlpatterns = [
    re_path(r'^$', lambda request, *args, **kwargs: HttpResponse()),
    re_path(r'^admin/', admin.site.urls),
]

Replace url() with re_path() available in newer Django
Replace url() with re_path() available in newer Django
