歩いたら休め

なんでこんな模様をしているのですか?

【Django】GAEでとりあえずアプリケーションを立ち上げる その2

docs.djangoproject.com

私はpipenvを利用したいので、GAEのPython3.7のサンプルアプリケーションにある .gcloudignore を参考にしつつ、PipfilePipfile.lock などを追記します。

# This file specifies files that are *not* uploaded to Google Cloud Platform
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
#   $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore
Pipfile
Pipfile.lock

# Python pycache:
__pycache__/

また、 mysite/settigs.py に ALLOWED_HOSTSを追記しました。今のところ公開するつもりの無いアプリケーションなので DEBUG=True などを指定して適当にやってしまっていますが、セキュリティ関連もちゃんと設定しなきゃいけないですね。

# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'qr1q-b3u&hogehoge'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True