[Fixed]-ImportError: no module named urls but ROOT_URLCONF is correct

1👍

The solution was to remove the quotes from ‘admin.site.urls.’ The quotes are still needed when including URLs from an INSTALLED_APP, but for some reason the admin one doesn’t like quotes.

👤waffle

0👍

is user_myusername_xyz a python package? Does that directory have an
init.py
? If it doesn’t, it shouldn’t be in an import path

I’m guessing no, it doesn’t, and you need something more like:

ROOT_URLCONF = 'djangotut.urls'

Leave a comment