ImportError: cannot import name 'url' from 'django.conf.urls' (/home/chams/pfe_project/CarApp/venv/lib/python3.8/site-packages/django/conf/urls/_init_.py)
I can't find any mistakes in my code !
ImportError: cannot import name 'url' from 'django.conf.urls' (/home/chams/pfe_project/CarApp/venv/lib/python3.8/site-packages/django/conf/urls/_init_.py)
I can't find any mistakes in my code !
django.conf.urls.url() was deprecated in Django 3.0, and is removed in Django 4.0+. The easiest fix is to replace url() with re_path()
You will be using this,
from django.conf.urls import url
Instead use this:
from django.urls import re_path as url