Trying to trace a circular import error in Django

后端 未结 10 2038
被撕碎了的回忆
被撕碎了的回忆 2021-02-05 09:00

I understand circular import error has been asked about a lot but after going through these questions I haven\'t been able to solve my issue. When I try to run my server in Djan

10条回答
  •  迷失自我
    2021-02-05 09:37

    In my case I was getting error because I was giving wrong path of dir containing urls. So I changed this

    urlpatterns = [
        url(r'^user/', include('core.urls'))
    ]
    

    to this

    urlpatterns = [
        url(r'^user/', include('core.urls.api'))
    ]
    

提交回复
热议问题