Python Forum

Full Version: Django Python Vscode Error Please Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I get an error when I try to import some Django.


m595h-1



The error message is the following :Unable to import 'django.conf.urls' and 'django.contrib'
Please, don't post images, copy paste code in python tags.

Please, use proper tags when post code, traceback, output, etc.
See BBcode help for more info.

Please, post the entire traceback that you get. We need to see the whole thing. Do not just give us the last line.
Take a time to read What to include in a post
Before you post any further, please, read carefully forum rules
from django.urls import path

urlpatterns = [
    path('admin/', admin.site.urls),
]
Hi,

@Smhbugra : two possibilities:

1. you installed Django in way that your IDE doesn't find it.
2. The code you use is not compatible for your Django version. On routing, there have been some changes over time. Which Django version are you using?

Regards, noisefloor