django url路由分发
都在项目文件url分发
extra_patterns = [ path('myapp/login/',views.index) ] urlpatterns = [ path('zong/',include(extra_patterns)) ]
页面展示
http://127.0.0.1:8000/zong/myapp/login/
views 代码
def index(request): return HttpResponse("login")