Skip to content Skip to sidebar Skip to footer

The Included Urlconf 'appname.urls' Does Not Appear To Have Any Patterns In It

Checking the documentation doesn't show any potential cause for the error. I have a django project with a number of apps (dir layout: ) settings.py (cryptoboard): ... # SECURITY W

Solution 1:

You do not have an import of re_path like commented already:

from django.urlsimport  re_path

As this will always cause an error, you must have got a reference to a re_path by some way . . And THAT re_path can not be used like re_path(...) because it must be a different type of object ... now lets find the source if that re_path

Solution 2:

I'm not so sure why it works, but deleting all tables, recreating and rerunning migrations, and reordering the urls:

urls.py (cryptoboard)

from django.contrib import admin
from django.urls import path, include

urlpatterns = [
    path('', include('frontend.urls')),
    path('', include('leads.urls')),
    path('', include('cryptousers.urls')),
    path('', include('cryptocurrency.urls')) 
]

to

from django.contrib import admin
from django.urls import path, include

urlpatterns = [
    path('', include('cryptocurrency.urls')), # <= DOES NOT DEPEND ON ANY OF THE APPS # BELOW (ONLY A MODEL FROM CRYPTOUSERS)
    path('', include('frontend.urls')),
    path('', include('leads.urls')),
    path('', include('cryptousers.urls')),
]

works in my case.

The circular error import exception message seems to be an umbrella message in that, it cannot be caused only by an actual circular import. Running manage.py in the debugger revealed that a package (pika) was also missing (needed by dramatiq) among other stuff ...

Post a Comment for "The Included Urlconf 'appname.urls' Does Not Appear To Have Any Patterns In It"