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),
]