Django URLS, how to map root to app?

后端 未结 7 980
迷失自我
迷失自我 2021-01-30 08:43

I am pretty new to django but experienced in Python and java web programming with different frameworks. I have made myself a nice little django app, but I cant seem to make it m

7条回答
  •  走了就别回头了
    2021-01-30 09:08

    old question here ... (as much as myself :o)
    but still worth of sharing updates for Django 3.x:

    In project urls.py just add:

    urlpatterns = [
        path('', include('myapp.urls')), 
        path('myapp/', include('myapp.urls')),
        #path('admin/', admin.site.urls),
    ]
    

    Be aware that this solution will monopolize the whole django to your hungry&selfish app :-) !!!

提交回复
热议问题