Django2.0版本的URL配置
#views.py
from django.http import HttpResponse
def hello(request):
return HttpResponse('Hello World!')
#urls.py
from django.conf.urls import patterns, include, url
from paltform import views
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^hello/', 'views.hello'),
]