Setting Django secret key in environment variable fails due to special character

后端 未结 1 944
清歌不尽
清歌不尽 2021-01-20 02:07

I\'m trying to set a Django secret key as a local environment variable in my venv/bin/activate.

But the key has a \"(\" in it and I get a venv error

相关标签:
1条回答
  • 2021-01-20 02:50

    Surround the string with single or double quotes. For longer strings (more than one line), you can use single or double quotes in sets of three. For more information and examples, refer to http://docs.python.org/release/2.5.2/ref/strings.html.

    0 讨论(0)
提交回复
热议问题