django路由

project 下的urls 配置

from django.conf.urls import url, include
from django.contrib import admin
from app01 import views

urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^app01/', include('app01.urls')), #appo1 的配置
url(r'^app02/', include('app02.urls')), #app02 的配置
]

app01下的urls配置
from django.conf.urls import url

from app01 import views
urlpatterns = [
url(r'^home/', views.home),
]
app02 下的urls配置
from django.conf.urls import url

from app02 import views
urlpatterns = [
url(r'^home/', views.home),
]

posted on 2017-07-10 11:09  run_qin  阅读(121)  评论(0编辑  收藏  举报

导航