Trying to trace a circular import error in Django

后端 未结 10 2260
被撕碎了的回忆
被撕碎了的回忆 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:34

    In my case, I was getting

    /SLMS_APP1/urls.py'>' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import.

    I made a typo in 'urlpatter'

    urlpatter = [ path('',views.index, name='index'),

    ]

    where in correct spelling has to be 'urlpatterns'

    urlpatterns = [ path('',views.profile, name='profile'),

    ]

提交回复
热议问题