在主程序里面的URL.py 中
from django.conf.urls import url, include urlpatterns = [ url(r'^cmdb/', include('app01.url')), url(r'^monitor/', include('app02.url')), ]
在app01.url
from django.conf.urls import url from app01 import views urlpatterns = [ url(r'^login/', views.index), # url(r'^detail/', views.detail), # url(r'^detail.html-(d+).html', views.detail, name='indexx'), # url(r'^sdaddad/(d+)/', views.detail, name='indexx'), ]