8
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

windowsの環境でwebアプリ制作でハマったこと

Last updated at Posted at 2020-11-05
    return database_name == ':memory:' or 'mode=memory' in database_name
TypeError: argument of type 'WindowsPath' is not iterable

このエラーがなかなか消えなかったので、windows環境でdjanogoを使っている人に向けてメモを残す。
setting.pyのデータベースの部分を変更する必要がある。

'NAME': BASE_DIR / 'db.sqlite3',
この部分を変更する。

'NAME': str(BASE_DIR / 'db.sqlite3'),

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': str(BASE_DIR / 'db.sqlite3'),
    }
}

翻訳では引数は何回も使えない。

8
6
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?