2020
11-29
11-29
Django多个app urls配置代码实例
快速测试创建项目与appdjango-adminstartprojectmysitedjango-adminstartappapp1django-adminstartappapp2mysite下的urls.py文件fromdjango.contribimportadminfromdjango.urlsimportinclude,pathurlpatterns=[path('admin/',admin.site.urls),path('app1/',include('apps.app1.urls',namespace='app1')),path('app2/',include('apps.app2.urls',namespace='app2')),]app1下的apps文件fromdjango.appsi...
继续阅读 >