BOGUN
BOGUN
2016-08-17 07:30

在iis上部署django进行登录时提示错误

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

  1. response = self.process_exception_by_middleware(e, request)

File "D:\python\lib\site-packages\django\core\handlers\base.py" in get_response

  1. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "D:\python\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func

  1. response = view_func(request, *args, **kwargs)

File "D:\python\lib\site-packages\django\contrib\admin\sites.py" in login

  1. return login(request, **defaults)

File "D:\python\lib\site-packages\django\contrib\auth\views.py" in inner

  1. return func(*args, **kwargs)

File "D:\python\lib\site-packages\django\views\decorators\debug.py" in sensitive_post_parameters_wrapper

  1. return view(request, *args, **kwargs)

File "D:\python\lib\site-packages\django\utils\decorators.py" in _wrapped_view

  1. response = view_func(request, *args, **kwargs)

File "D:\python\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func

  1. response = view_func(request, *args, **kwargs)

File "D:\python\lib\site-packages\django\contrib\auth\views.py" in login

  1. auth_login(request, form.get_user())

File "D:\python\lib\site-packages\django\contrib\auth__init__.py" in login

  1. request.session.cycle_key()

File "D:\python\lib\site-packages\django\contrib\sessions\backends\base.py" in cycle_key

  1. self.create()

File "D:\python\lib\site-packages\django\contrib\sessions\backends\db.py" in create

  1. self.save(must_create=True)

File "D:\python\lib\site-packages\django\contrib\sessions\backends\db.py" in save

  1. obj.save(force_insert=must_create, using=using)

File "D:\python\lib\site-packages\django\db\models\base.py" in save

  1. force_update=force_update, update_fields=update_fields)

File "D:\python\lib\site-packages\django\db\models\base.py" in save_base

  1. 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

  1. 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

  1. using=using, raw=raw)

File "D:\python\lib\site-packages\django\db\models\manager.py" in manager_method

  1. return getattr(self.get_queryset(), name)(*args, **kwargs)

File "D:\python\lib\site-packages\django\db\models\query.py" in _insert

  1. 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

  1. cursor.execute(sql, params)

File "D:\python\lib\site-packages\django\db\backends\utils.py" in execute

  1. return super(CursorDebugWrapper, self).execute(sql, params)

File "D:\python\lib\site-packages\django\db\backends\utils.py" in execute

  1. return self.cursor.execute(sql, params)

File "D:\python\lib\site-packages\django\db\utils.py" in exit

  1. six.reraise(dj_exc_type, dj_exc_value, traceback)

File "D:\python\lib\site-packages\django\db\backends\utils.py" in execute

  1. return self.cursor.execute(sql, params)

File "D:\python\lib\site-packages\django\db\backends\sqlite3\base.py" in execute

  1. return Database.Cursor.execute(self, query, params)

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


  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐