Django:自作のエラー画面を使用する
凡例
urls.py
handlerHTTPステータスコード = 'エラー画面出力用関数'
実装例
404エラー画面を自作
urls.py
handler404 = …
handlerHTTPステータスコード = 'エラー画面出力用関数'
handler404 = …
my_field = MyChoiceField(
...
choices=[
(optionのvalue, optionのinnerText), …
docker run --rm -i hadolint/hadolint < Dockerfile
※Docker for Windows をインストールしている …
C/C++のソースコードのビルド時に以下のエラーが発生
...
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit …
cat <<EOF > /path/to/file
foo
bar
baz
EOF
from logging.config import dictConfig
import os
LOG_DIR = 'ログ出力先ディレクトリのパス'
if not …
import re
with open('/path/to/file') as f:
# ファイルから全行を取得(str型)
c = f.read()
# …
date +%s
import time
# Unixtime(epoch)がfloat型で返却される
time.time()
Kibanaの最大メモリのdefault設定値は1.4GB
Using Kibana in a production environment …
python -c "import uuid;print(uuid.uuid4())" …