2016-08-20 5 views
0

django 1.9.7, https://github.com/bread-and-pepper/django-userena 단계별로 설치 한 임, 왜이 오류가 발생합니까?장고 오류 SiteProfileNotAvailable

감사 settings.py

INSTALLED_APPS = [ 
'userena', 
'guardian', 
'easy_thumbnails', 
] 
ANONYMOUS_USER_ID = -1 

오류 :

당신이 사이트의 객체를 생성하는 데 필요한 docs에서 언급 한 바와 같이
Traceback (most recent call last): 
File "manage.py", line 12, in <module> 
execute_from_command_line(sys.argv) 
File "C:\Python27\lib\site-packages\django\core\management\__init__.py",  line 353, in execute_from_command_line 
utility.execute() 
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 327, in execute 
django.setup() 
File "C:\Python27\lib\site-packages\django\__init__.py", line 18, in setup 
apps.populate(settings.INSTALLED_APPS) 
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 115, in populate 
app_config.ready() 
File "C:\Python27\lib\site-packages\django\contrib\admin\apps.py", line 22, in ready 
self.module.autodiscover() 
File "C:\Python27\lib\site-packages\django\contrib\admin\__init__.py", line 26, in autodiscover 
autodiscover_modules('admin', register_to=site) 
File "C:\Python27\lib\site-packages\django\utils\module_loading.py", line 50, in autodiscover_modules 
import_module('%s.%s' % (app_config.name, module_to_search)) 
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module 
__import__(name) 
File "C:\Python27\lib\site-packages\userena\admin.py", line 31, in <module> 
admin.site.register(get_profile_model(), GuardedModelAdmin) 
File "C:\Python27\lib\site-packages\userena\utils.py", line 137, in get_profile_model 
raise SiteProfileNotAvailable 
userena.compat.SiteProfileNotAvailable 

답변

0

(Sites Framework 참조) 관리자 패널 또는 쉘 또는 고정 통한에서 중 SITE_ID을 사용하여 설정에서 해당 ID를 정의하십시오.

+0

대단히 감사합니다. –