問題
Djangoで作成したアプリをherokuへデプロイしようとしたときに、SECRET KEYが反映されずに困った。
解決方法
SECRET KEYの括弧やアンド [ (, ), & ] が原因で認識しているみたい。
上記の記号を""(ダブルクオート)で囲むことでherokuにSECRET KEYの環境変数を指定できた。
& 'heroku' @('config:set', 'SECRET_KEY=eoik6-"&"dnr9elgmrt7-%3hu_"&"37$3hg!9c6x!^khjr3!z*z"&"b4')
(SECRET KEYはそれぞれのアプリのもので設定)
環境
PowerShell(Bashでは反映できなかった)
Django 3.2.7
Python 3.9.5