2016-08-17 3 views
-1

I는 다음과 같이 i는 수퍼 유저 이름과 암호를 사용하여 관리자 페이지에 로그인 iis6.When 내 장고 프로젝트, 그것은 실수를 생산하고 배포 데이터베이스 파일을 열 수 없습니다에서 OperationalError :장고 :/관리자/로그인/

enter code here 
Environment: 


Request Method: POST 
Request URL: http://localhost/admin/login/?next=/admin/ 

Django Version: 1.9.6 
Python Version: 2.7.11 
Installed Applications: 
['django.contrib.admin', 
'django.contrib.auth', 
'django.contrib.contenttypes', 
'django.contrib.sessions', 
'django.contrib.messages', 
'django.contrib.staticfiles'] 
Installed Middleware: 
['django.middleware.security.SecurityMiddleware', 
'django.contrib.sessions.middleware.SessionMiddleware', 
'django.middleware.common.CommonMiddleware', 
'django.middleware.csrf.CsrfViewMiddleware', 
'django.contrib.auth.middleware.AuthenticationMiddleware', 
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 
'django.contrib.messages.middleware.MessageMiddleware', 
'django.middleware.clickjacking.XFrameOptionsMiddleware'] 



Traceback: 

File "D:\python\lib\site-packages\django\core\handlers\base.py" in get_response 
    149.      response = self.process_exception_by_middleware(e, request) 

File "D:\python\lib\site-packages\django\core\handlers\base.py" in get_response 
    147.      response = wrapped_callback(request, *callback_args, **callback_kwargs) 

File "D:\python\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func 
    57.   response = view_func(request, *args, **kwargs) 

File "D:\python\lib\site-packages\django\contrib\admin\sites.py" in login 
    413.   return login(request, **defaults) 

File "D:\python\lib\site-packages\django\contrib\auth\views.py" in inner 
    49.   return func(*args, **kwargs) 

File "D:\python\lib\site-packages\django\views\decorators\debug.py" in sensitive_post_parameters_wrapper 
    76.    return view(request, *args, **kwargs) 

File "D:\python\lib\site-packages\django\utils\decorators.py" in _wrapped_view 
    149.      response = view_func(request, *args, **kwargs) 

File "D:\python\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func 
    57.   response = view_func(request, *args, **kwargs) 

File "D:\python\lib\site-packages\django\contrib\auth\views.py" in login 
    76.    auth_login(request, form.get_user()) 

File "D:\python\lib\site-packages\django\contrib\auth\__init__.py" in login 
    110.   request.session.cycle_key() 

File "D:\python\lib\site-packages\django\contrib\sessions\backends\base.py" in cycle_key 
    305.   self.create() 

File "D:\python\lib\site-packages\django\contrib\sessions\backends\db.py" in create 
    53.     self.save(must_create=True) 

File "D:\python\lib\site-packages\django\contrib\sessions\backends\db.py" in save 
    86.     obj.save(force_insert=must_create, using=using) 

File "D:\python\lib\site-packages\django\db\models\base.py" in save 
    708.      force_update=force_update, update_fields=update_fields) 

File "D:\python\lib\site-packages\django\db\models\base.py" in save_base 
    736.    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields) 

File "D:\python\lib\site-packages\django\db\models\base.py" in _save_table 
    820.    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw) 

File "D:\python\lib\site-packages\django\db\models\base.py" in _do_insert 
    859.        using=using, raw=raw) 

File "D:\python\lib\site-packages\django\db\models\manager.py" in manager_method 
    122.     return getattr(self.get_queryset(), name)(*args, **kwargs) 

File "D:\python\lib\site-packages\django\db\models\query.py" in _insert 
    1039.   return query.get_compiler(using=using).execute_sql(return_id) 

File "D:\python\lib\site-packages\django\db\models\sql\compiler.py" in execute_sql 
    1060.     cursor.execute(sql, params) 

File "D:\python\lib\site-packages\django\db\backends\utils.py" in execute 
    79.    return super(CursorDebugWrapper, self).execute(sql, params) 

File "D:\python\lib\site-packages\django\db\backends\utils.py" in execute 
    64.     return self.cursor.execute(sql, params) 

File "D:\python\lib\site-packages\django\db\utils.py" in __exit__ 
    95.     six.reraise(dj_exc_type, dj_exc_value, traceback) 

File "D:\python\lib\site-packages\django\db\backends\utils.py" in execute 
    64.     return self.cursor.execute(sql, params) 

File "D:\python\lib\site-packages\django\db\backends\sqlite3\base.py" in execute 
    323.   return Database.Cursor.execute(self, query, params) 

Exception Type: OperationalError at /admin/login/ 
Exception Value: unable to open database file 

다음은 DB 파일 경로대신 백 슬래시 슬래시 나는 DB 파일의 권한을 변경하려고했지만 그냥

답변

2

사용을 작동하지 않았다

enter code here 
DATABASES = { 
    'default': { 
     'ENGINE': 'django.db.backends.sqlite3', 
     'NAME': 'C:\\inetpub\\wwwroot\\untitled5\\db\\db.sqlite3', 
    } 
} 

내 settings.py입니다.

+0

데이타베이스 = { '기본': { '엔진': 'django.db.backends.sqlite3', 'NAME': 'C : /inetpub/wwwroot/untitled5/db/db.sqlite', } } 이렇게 변경하면 여전히 작동하지 않습니다. – bogun