我正在使用sqlite3和后我python manage.py syncdb它应该创建一个数据库文件(称为sqlite3.db)它不这样做。我试过搜索这个文件,并试图以管理员和普通用户的身份运行所有命令。到目前为止没有运气。无法创建.db文件Django
什么错吗?我会非常感谢这里的帮助!
这里的回溯:
Traceback (most recent call last):
File "manage.py", line 14, in <module> execute_manager(settings)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 351, in handle return self.handle_noargs(**options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 56, in handle_noargs cursor = connection.cursor()
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/__init__.py", line 250, in cursor cursor = self.make_debug_cursor(self._cursor())
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py", line 201, in _cursor raise ImproperlyConfigured("Please fill out the database NAME in the settings module before using the database.")
django.core.exceptions.ImproperlyConfigured: Please fill out the database NAME in the settings module before using the database.
顺便说一句,我没有使用最新的Django。我正在使用Django 1.3 我的操作系统是Linux Mint。
您是否尝试填写'NAME'? –
该错误完全告诉你你错过了什么...... – Ben
我知道我必须用sqlite3数据库文件的完整绝对路径来填写名称。问题是我没有那个数据库文件!当它应该这样做时,它不会创建一个。 – Alexander