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
In my case i was getting this error because i was typing urlpatterns in urls.py to urlpattern.
this error basically occurs when you have, include the app in the main urls.py file and haven't declared urlpattern= [] in-app file.
Try changing
urlpatterns = [
url(r'^accounts/', include('accounts_app')),
]
to
urlpatterns = [
url(r'^accounts/', include('accounts_app.urls')), # add .urls after app name
]
In my case, I got this error because I called the reverse function for a url that required a slug parameter without placing the correct parameter in it.
Once I fixed the reverse function, it was resolved.
for those who have the same error but still hasn't debugged their code, also check how you typed "urlpatterns"
having it mistyped or with dash/underscore will result to the same error
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'),
]