-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: cannot import name 'url' from 'django.conf.urls' #659
Comments
This problem has been solved here |
Hi! |
even install pip but still this error occure rom django.conf.urls import url, include |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(env_universal) usama@Usamas-MacBook-Pro DRF_test % python manage.py makemigrations
Traceback (most recent call last):
File "/Users/usama/Desktop/projects/DRF_test/manage.py", line 22, in
main()
File "/Users/usama/Desktop/projects/DRF_test/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
utility.execute()
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/management/init.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/management/base.py", line 414, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/management/base.py", line 455, in execute
self.check()
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/management/base.py", line 487, in check
all_issues = checks.run_checks(
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/checks/registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/checks/urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/core/checks/urls.py", line 24, in check_resolver
return check_method()
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/urls/resolvers.py", line 480, in check
for pattern in self.url_patterns:
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/utils/functional.py", line 49, in get
res = instance.dict[self.name] = self.func(instance)
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/urls/resolvers.py", line 696, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/utils/functional.py", line 49, in get
res = instance.dict[self.name] = self.func(instance)
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/urls/resolvers.py", line 689, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/local/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Users/usama/Desktop/projects/DRF_test/buzzshare/urls.py", line 8, in
path('rest-auth/', include('rest_auth.urls')),
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/urls/conf.py", line 38, in include
urlconf_module = import_module(urlconf_module)
File "/usr/local/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/rest_auth/urls.py", line 1, in
from django.conf.urls import url
ImportError: cannot import name 'url' from 'django.conf.urls' (/Users/usama/Desktop/projects/env_universal/lib/python3.9/site-packages/django/conf/urls/init.py)
(env_universal) usama@Usamas-MacBook-Pro DRF_test % pip install django-rest-auth
Is it not compatible with django 4
The text was updated successfully, but these errors were encountered: