Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 -bash: venv/bin/activate: line 85: syntax error near unexpected token ')'

I'm a bit stuck here. How can I set this Key as a local environment variable so that it accepts these special characters?

like image 243
Euan Millar Avatar asked Nov 12 '22 02:11

Euan Millar


1 Answers

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.

like image 62
Joe Tricarico Avatar answered Nov 15 '22 05:11

Joe Tricarico