I've scoured all of the issues I can find about this error and tried all of the solutions, yet none (save one; more on that later) worked for me. Every time I start up my app, I get the following error:
django.core.exceptions.ImproperlyConfigured: The included URLconf 'gamerank.urls' 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've checked my files for circular imports, and cannot find any at all.
- voting/urls.py only imports voting/views.py
- voting/views.py imports voting/models.py, voting/helpers.py, and voting/forms.py
- voting/models.py imports from libraries only
- voting/helpers.py imports from libraries only
- voting/forms.py imports from voting/models.py (which does not import from voting/forms.py)
This answer works for me, but I cannot access any of my application after that (because I just commented out the routes), so it's not really a solution in my case.
Here are some of my files:
voting/urls.py
from django.urls import path
from . import views
app_name = 'voting'
urlpatterns = [
path('', views.index, name="index"),
# auth routes
path("login", views.login_view, name="login"),
path("logout", views.logout_view, name="logout"),
path("register", views.register, name="register")
]
gamerank/urls.py
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('voting.urls')),
]