티스토리 뷰
Stack Overflow에 자주 검색, 등록되는 문제들과 제가 개발 중 찾아 본 문제들 중에서 나중에도 찾아 볼 것 같은 문제들을 정리하고 있습니다.
Stack Overflow에서 가장 먼저 확인하게 되는 가장 높은 점수를 받은 Solution과 현 시점에 도움이 될 수 있는 가장 최근에 업데이트(최소 점수 확보)된 Solution을 각각 정리하였습니다.
아래 word cloud를 통해 이번 포스팅의 주요 키워드를 미리 확인하세요.

ImportError: No module named 'django.core.urlresolvers'
ImportError: 'django.core.urlresolvers'라는 모듈이 없습니다.
문제 내용
I am working on Django project where I need to create a form for inputs. I tried to import reverse
from django.core.urlresolvers
. I got an error:
나는 입력을 위한 양식을 만들어야 하는 장고 프로젝트를 하고 있다. 나는 django.core.urlresolvers에서 reverse를 가져오려고 했다. 오류가 발생했습니다.
line 2, in from django.core.urlresolvers import reverse ImportError: No module named 'django.core.urlresolvers'
I am using Python 3.5.2, Django 2.0 and MySQL.
나는 파이썬 3.5.2, 장고 2.0, MySQL을 사용하고 있다.
높은 점수를 받은 Solution
Django 2.0 removes the django.core.urlresolvers
module, which was moved to django.urls
in version 1.10. You should change any import to use django.urls instead, like this:
django 2.0은 버전 1.10에서 django.urls로 이동된 django.core.urlresolvers 모듈을 제거합니다. 가져오기를 다음과 같이 대신 django.urls를 사용하도록 변경해야 합니다.
from django.urls import reverse
Note that Django 2.0 removes some features that previously were in django.core.urlresolvers
, so you might have to make some more changes before your code works. See the features deprecated in 1.9 for details on those additional changes.
Django 2.0은 이전에 django.core.urlresolvers에 있던 일부 기능을 제거하므로 코드가 작동하기 전에 몇 가지 더 변경해야 할 수 있습니다. 추가 변경 사항에 대한 자세한 내용은 1.9에서 사용되지 않는 기능을 참조하십시오.
가장 최근 달린 Solution
use from django.urls import reverse instead of from django.core.urlresolvers import reverse
django.core.urlresolvers 가져오기 역방향 대신 django.core에서 사용
출처 : https://stackoverflow.com/questions/43139081/importerror-no-module-named-django-core-urlresolvers
'개발 > 파이썬' 카테고리의 다른 글
pip가 패키지를 성공적으로 설치하지만 command line에서 실행 파일을 찾을 수 없습니다. (0) | 2022.11.28 |
---|---|
Requests 패키지를 사용할 때 SSL InsecurePlatform 오류 발생 (0) | 2022.11.28 |
동적으로 가져온 모듈에서 동적 인스턴스 생성하기 (0) | 2022.11.28 |
Scraping: SSL: http://en.wikipedia.org에 대한 SSL: CERTIFICATE_VERIFI_FAILED 오류 (0) | 2022.11.27 |
가져오기 오류: sklearn.cross_validation이라는 모듈이 없습니다. (0) | 2022.11.27 |