)]}'
{"doc/source/topics/settings.rst":[{"author":{"_account_id":16628,"name":"Beth Elwell","email":"e.r.elwell@gmail.com","username":"bethelwell"},"change_message_id":"1ab89b83b2378e40ccbe79836b073f677d262352","unresolved":false,"context_lines":[{"line_number":1916,"context_line":""},{"line_number":1917,"context_line":".. note::"},{"line_number":1918,"context_line":""},{"line_number":1919,"context_line":"    Setting a custom secret key: You can either set it to a specific value or"},{"line_number":1920,"context_line":"    you can let Horizon generate a default secret key that is unique on this"},{"line_number":1921,"context_line":"    machine, regardless of the amount of Python WSGI workers (if used behind"},{"line_number":1922,"context_line":"    Apache+mod_wsgi). However, there may be situations where you would want to"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a6eadb0_7274e39b","line":1919,"updated":"2016-12-13 14:52:48.000000000","message":"is it worth still including the notes re the local_settings.py.example file and the default value settings?","commit_id":"2754504eb46fa1a6d6c9882f9c78c8f6d066ea2b"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"782275d678040203a60d5eef3103a86cb4d9e3bd","unresolved":false,"context_lines":[{"line_number":1916,"context_line":""},{"line_number":1917,"context_line":".. note::"},{"line_number":1918,"context_line":""},{"line_number":1919,"context_line":"    Setting a custom secret key: You can either set it to a specific value or"},{"line_number":1920,"context_line":"    you can let Horizon generate a default secret key that is unique on this"},{"line_number":1921,"context_line":"    machine, regardless of the amount of Python WSGI workers (if used behind"},{"line_number":1922,"context_line":"    Apache+mod_wsgi). However, there may be situations where you would want to"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1a6eadb0_121e4f0c","line":1919,"in_reply_to":"1a6eadb0_7274e39b","updated":"2016-12-13 14:57:54.000000000","message":"Horizon will call exactly that code for you if you leave SECRET_KEY as None. There is no reason for you to put any additional code into the local_settings.py, and when we move to .conf files, it will no longer be possible anyways.","commit_id":"2754504eb46fa1a6d6c9882f9c78c8f6d066ea2b"}],"openstack_dashboard/settings.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e65d45cc4eebcdb0b5cfbad7c97c117cc0976cdd","unresolved":false,"context_lines":[{"line_number":417,"context_line":"# Ensure that we always have a SECRET_KEY set, even when no local_settings.py"},{"line_number":418,"context_line":"# file is present. See local_settings.py.example for full documentation on the"},{"line_number":419,"context_line":"# horizon.utils.secret_key module and its use."},{"line_number":420,"context_line":"settings_utils.ensure_secret_key(globals())"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"# populate HORIZON_CONFIG with auto-discovered JavaScript sources, mock files,"},{"line_number":423,"context_line":"# specs files and external templates."}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_19ba3f09","line":420,"updated":"2017-04-09 10:15:08.000000000","message":"Generally speaking it is not a recommended way to pass globals() to a function without special reason. How about passing only required parameters?\n\n SECRET_KEY \u003d  settings_utils.ensure_secret_key(\n     globals().get(\u0027SECRET_KEY\u0027), __file__)\n\nLooking at the current situation, we might be better to have a configuration option \u0027secret_key_file\u0027 rather than \u0027secret_key\u0027 itself, but I think this is beyond the scope of this patch.","commit_id":"7023fdbd16a98f8a9c630e0a88bc10d219798471"}],"openstack_dashboard/utils/settings.py":[{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"bc1b9b4d3b7f6d03386f7dd02870e4336229c156","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    module \u003d sys.modules[module_name]"},{"line_number":35,"context_line":"    if module.SECRET_KEY:"},{"line_number":36,"context_line":"        return"},{"line_number":37,"context_line":"    local_path \u003d os.path.dirname(os.path.abspath(module.__file__))"},{"line_number":38,"context_line":"    module.SECRET_KEY \u003d secret_key.generate_or_read_from_file("},{"line_number":39,"context_line":"        os.path.join(local_path, \u0027.secret_key_store\u0027))"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_2fd2f9d2","line":37,"updated":"2016-12-13 18:53:31.000000000","message":"As I understand it, settings is loaded before local_settings, which then override things. So doing a side-by-side comparison, is it missing the \u0027local\u0027 join? or do we not need that anymore?","commit_id":"2754504eb46fa1a6d6c9882f9c78c8f6d066ea2b"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"faf0597dfb1ac6034f1a1115b891c2742333ff76","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    module \u003d sys.modules[module_name]"},{"line_number":35,"context_line":"    if module.SECRET_KEY:"},{"line_number":36,"context_line":"        return"},{"line_number":37,"context_line":"    local_path \u003d os.path.dirname(os.path.abspath(module.__file__))"},{"line_number":38,"context_line":"    module.SECRET_KEY \u003d secret_key.generate_or_read_from_file("},{"line_number":39,"context_line":"        os.path.join(local_path, \u0027.secret_key_store\u0027))"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_e2eb9cae","line":37,"in_reply_to":"1a6eadb0_2fd2f9d2","updated":"2016-12-14 09:39:28.000000000","message":"I did a search of the code for LOCAL_PATH, and this is the only place where it is being used. I also couldn\u0027t see it in the documentation anywhere. It can\u0027t be used for things like finding local_settings.py or local_settings.d, because you need to know it before you start loading those, and you don\u0027t have an opportunity to set it before that.\n\nSo the only thing LOCAL_PATH could be useful for, would be controlling where the secret key file is getting saved.\n\nI can bring it back if we really need it (but again, it\u0027s not documented anywhere, so it\u0027s not a part of official settings) -- but I would like to propose renaming it to something more meaningful, like \"SECRET_KEY_PATH\", and adding to the documentation.","commit_id":"2754504eb46fa1a6d6c9882f9c78c8f6d066ea2b"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"0f82bd169c96b2523ea6169376d61dd6db72106c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    module \u003d sys.modules[module_name]"},{"line_number":35,"context_line":"    if module.SECRET_KEY:"},{"line_number":36,"context_line":"        return"},{"line_number":37,"context_line":"    local_path \u003d os.path.dirname(os.path.abspath(module.__file__))"},{"line_number":38,"context_line":"    module.SECRET_KEY \u003d secret_key.generate_or_read_from_file("},{"line_number":39,"context_line":"        os.path.join(local_path, \u0027.secret_key_store\u0027))"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_621dccbc","line":37,"in_reply_to":"1a6eadb0_e2eb9cae","updated":"2016-12-15 08:08:48.000000000","message":"After a moment of thought, I think that the commit message should mention removing of LOCAL_PATH, though.","commit_id":"2754504eb46fa1a6d6c9882f9c78c8f6d066ea2b"}]}
