Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#34471 closed Bug (invalid)

Cannot import name 'url' from 'django.conf.urls'

Reported by: VJ Magar Owned by: VJ Magar
Component: Uncategorized Version: 4.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

After creating new Django app using django-admin startproject when trying to run the project, we are getting import error for the URL.

Change History (3)

comment:1 by VJ Magar, 21 months ago

Owner: changed from nobody to VJ Magar
Status: newassigned

comment:2 by Mariusz Felisiak, 21 months ago

Resolution: invalid
Status: assignedclosed
Summary: ImportError: cannot import name 'url' from 'django.conf.urls'Cannot import name 'url' from 'django.conf.urls'

The django.conf.urls.url alias was deprecated in Django 3.1 and removed in Django 4.0.

in reply to:  2 comment:3 by VJ Magar, 21 months ago

Replying to Mariusz Felisiak:

The django.conf.urls.url alias was deprecated in Django 3.1 and removed in Django 4.0.

Hey Mariusz Felisiak,

I knew that django.conf.urls.url was removed in Django 4.0. However, I was getting this error when setup the new django project.
It turns out that I had accidentally used older version of Django (some old django from global space).

Thanks for quickly marking this issue as invalid. It saved few hours of mine

Note: See TracTickets for help on using tickets.
Back to Top