urlpatterns = {
url("^blog/", views.bolg)
}
{百分号 url "别名" [[参数1] ...] 百分号}
,表示此处为指定别名代表的路径
media配置
from django.views.static import serve
from django.conf import settings
urlpatterns = [
url(r'^media/(?P<path>.*)$', serve, {"document_root": settings.MEDIA_ROOT}),
]