이 없습니다AttributeError는 'RegexURLResolver'개체가 어떤 속성 '_urlconf_module'내 센트리 예외가 아래의 오류가 계속
AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'
그리고 추적은 어떤 가리키는없이 장고 코드베이스를 withing에 코드를 가리키는 내 신청서에 넣으십시오. 내 로그도 깨끗합니다. 이것에 대한 가능한 이유는 무엇일까요? 내가 views.py
에서 직접 함수를 호출 할 때 나는이 문제에 충돌
The issue is caused by an import ordering problem, in your example code you call urlresolvers.reverse which will load example/urls.py, which will trigger an admin.autodiscover() call, which will load social/apps/django_app/default/admin.py, which will try to load your custom user model which will fail to load your user model.
,이 기능은 아마도 가져 오기로 이어질 resolve
의 사용 결과 :
raise Resolver404({'path' : path})
@property
def urlconf_module(self):
try:
return self._urlconf_module
except AttributeError:
self._urlconf_module = import_module(self.urlconf_name)
return self._urlconf_module
@property
'self'
<RegexURLResolver urls (None:None) ^/>
초기화되기 전에 클래스의 regexresolver를 호출하는 것처럼 보입니다. 의존성 문제 일 수 있습니다. – karthikr
당신은 정교 할 수 있습니까? 나는 URL과 관련된 아무 것도 변경하지 않았으며이 오류가 나타나기 시작했다. 이 디버깅에 대해 어떻게 생각하세요? –