from django.conf.urls import url
 
from . import view
 
urlpatterns = [
    url(r'^hello$', view.hello),]

新版本2.0以上:

from django.urls import path
from . import view
 
urlpatterns = [
    path('hello/', view.hello),]