{"action":"created","issue":{"url":"https://api.github.com/repos/realpython/support/issues/174","labels_url":"https://api.github.com/repos/realpython/support/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/realpython/support/issues/174/comments","events_url":"https://api.github.com/repos/realpython/support/issues/174/events","html_url":"https://github.com/realpython/support/issues/174","id":58509264,"number":174,"title":"Real Python Part 2 - Page 96","user":{"login":"Markus-","id":9554640,"avatar_url":"https://avatars.githubusercontent.com/u/9554640?v=3","gravatar_id":"","url":"https://api.github.com/users/Markus-","html_url":"https://github.com/Markus-","followers_url":"https://api.github.com/users/Markus-/followers","following_url":"https://api.github.com/users/Markus-/following{/other_user}","gists_url":"https://api.github.com/users/Markus-/gists{/gist_id}","starred_url":"https://api.github.com/users/Markus-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Markus-/subscriptions","organizations_url":"https://api.github.com/users/Markus-/orgs","repos_url":"https://api.github.com/users/Markus-/repos","events_url":"https://api.github.com/users/Markus-/events{/privacy}","received_events_url":"https://api.github.com/users/Markus-/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-22T16:55:51Z","updated_at":"2015-03-24T23:46:55Z","closed_at":"2015-03-24T23:46:55Z","body":"The hint with creating the SECRET_KEY by applying the os.urandom-function is kind of heavy to follow.\r\n\r\nThe output is a byte-literal (python3) and some hard-to-read-stuff in python2.\r\nProbably you adjust the example to a ready-to-use-one?\r\n\r\nRegards\r\nMarkus"},"comment":{"url":"https://api.github.com/repos/realpython/support/issues/comments/85742380","html_url":"https://github.com/realpython/support/issues/174#issuecomment-85742380","issue_url":"https://api.github.com/repos/realpython/support/issues/174","id":85742380,"user":{"login":"mjhea0","id":2018167,"avatar_url":"https://avatars.githubusercontent.com/u/2018167?v=3","gravatar_id":"","url":"https://api.github.com/users/mjhea0","html_url":"https://github.com/mjhea0","followers_url":"https://api.github.com/users/mjhea0/followers","following_url":"https://api.github.com/users/mjhea0/following{/other_user}","gists_url":"https://api.github.com/users/mjhea0/gists{/gist_id}","starred_url":"https://api.github.com/users/mjhea0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjhea0/subscriptions","organizations_url":"https://api.github.com/users/mjhea0/orgs","repos_url":"https://api.github.com/users/mjhea0/repos","events_url":"https://api.github.com/users/mjhea0/events{/privacy}","received_events_url":"https://api.github.com/users/mjhea0/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T23:46:55Z","updated_at":"2015-03-24T23:46:55Z","body":"updated:\r\n\r\n> **WARNING**: Make the value of your secret key really, really hard, if not impossible, to guess. Use a random key generator to do this. Never, ever use a value you pick on your own. Or you can use your OS to get a random string:\r\n>\r\n>       >>> import os\r\n>       >>> os.urandom(24)\r\n>       'rM\\xb1\\xdc\\x12o\\xd6i\\xff+9$T\\x8e\\xec\\x00\\x13\\x82.*\\x16TG\\xbd'\r\n>\r\n> Now you can simply assign that string to the secret key: `SECRET_KEY = rM\\xb1\\xdc\\x12o\\xd6i\\xff+9$T\\x8e\\xec\\x00\\x13\\x82.*\\x16TG\\xbd`"}}