)]}'
{"ara/server/db_backend/base.py":[{"author":{"_account_id":9061,"name":"David Moreau Simard","email":"moi@dmsimard.com","username":"dmsimard"},"change_message_id":"066f6fd9d30d2580a5453c907b54cb475144c006","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"9fb8cfa7_f8e2949f","line":13,"updated":"2019-06-14 13:29:14.000000000","message":"That\u0027s far simpler than what I had. Kudos.","commit_id":"13306efb42acb800aada766e3abd5f653e719928"}],"ara/server/settings.py":[{"author":{"_account_id":9061,"name":"David Moreau Simard","email":"moi@dmsimard.com","username":"dmsimard"},"change_message_id":"066f6fd9d30d2580a5453c907b54cb475144c006","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    GLOBAL_ENV_FOR_DYNACONF\u003d\"ARA\", ENVVAR_FOR_DYNACONF\u003d\"ARA_SETTINGS\", SETTINGS_MODULE_FOR_DYNACONF\u003dDEFAULT_SETTINGS"},{"line_number":31,"context_line":")"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"MASS_HOSTING \u003d settings.get(\"MASS_HOSTING\", False)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# reread BASE_DIR since it might have gotten changed in the config file."},{"line_number":36,"context_line":"BASE_DIR \u003d settings.get(\"BASE_DIR\", BASE_DIR)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_78cf8428","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":12},"updated":"2019-06-14 13:29:14.000000000","message":"Should probably be called something similar to the database backend. If the database backend is named something like \"ara.server.distributed_sqlite\" it could be DISTRIBUTED_SQLITE for example ?","commit_id":"13306efb42acb800aada766e3abd5f653e719928"},{"author":{"_account_id":29199,"name":"Florian Apolloner","email":"florian@apolloner.eu","username":"apollo13"},"change_message_id":"49fae16985d27fe38edc195e13a340cdf873aff4","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    GLOBAL_ENV_FOR_DYNACONF\u003d\"ARA\", ENVVAR_FOR_DYNACONF\u003d\"ARA_SETTINGS\", SETTINGS_MODULE_FOR_DYNACONF\u003dDEFAULT_SETTINGS"},{"line_number":31,"context_line":")"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"MASS_HOSTING \u003d settings.get(\"MASS_HOSTING\", False)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# reread BASE_DIR since it might have gotten changed in the config file."},{"line_number":36,"context_line":"BASE_DIR \u003d settings.get(\"BASE_DIR\", BASE_DIR)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_7320079c","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":12},"in_reply_to":"9fb8cfa7_78cf8428","updated":"2019-06-14 13:45:19.000000000","message":"I am not good at naming things :)","commit_id":"13306efb42acb800aada766e3abd5f653e719928"},{"author":{"_account_id":9061,"name":"David Moreau Simard","email":"moi@dmsimard.com","username":"dmsimard"},"change_message_id":"066f6fd9d30d2580a5453c907b54cb475144c006","unresolved":false,"context_lines":[{"line_number":185,"context_line":"MEDIA_URL \u003d settings.get(\"MEDIA_URL\", \"/media/\")"},{"line_number":186,"context_line":"MEDIA_ROOT \u003d settings.get(\"MEDIA_ROOT\", os.path.join(BASE_DIR, \"www\", \"media\"))"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"ROOT_URLCONF \u003d \"ara.server.urls\""},{"line_number":189,"context_line":"APPEND_SLASH \u003d False"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"PAGE_SIZE \u003d settings.get(\"PAGE_SIZE\", 100)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_b8917c49","line":188,"range":{"start_line":188,"start_character":0,"end_line":188,"end_character":12},"updated":"2019-06-14 13:29:14.000000000","message":"So no need to touch ROOT_URLCONF after all ?","commit_id":"13306efb42acb800aada766e3abd5f653e719928"},{"author":{"_account_id":29199,"name":"Florian Apolloner","email":"florian@apolloner.eu","username":"apollo13"},"change_message_id":"49fae16985d27fe38edc195e13a340cdf873aff4","unresolved":false,"context_lines":[{"line_number":185,"context_line":"MEDIA_URL \u003d settings.get(\"MEDIA_URL\", \"/media/\")"},{"line_number":186,"context_line":"MEDIA_ROOT \u003d settings.get(\"MEDIA_ROOT\", os.path.join(BASE_DIR, \"www\", \"media\"))"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"ROOT_URLCONF \u003d \"ara.server.urls\""},{"line_number":189,"context_line":"APPEND_SLASH \u003d False"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"PAGE_SIZE \u003d settings.get(\"PAGE_SIZE\", 100)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_533943d4","line":188,"range":{"start_line":188,"start_character":0,"end_line":188,"end_character":12},"in_reply_to":"9fb8cfa7_b8917c49","updated":"2019-06-14 13:45:19.000000000","message":"No, because SCRIPT_NAME acts as \"virtual\" mount point. Django only knows about the URL below (mostly)","commit_id":"13306efb42acb800aada766e3abd5f653e719928"},{"author":{"_account_id":9061,"name":"David Moreau Simard","email":"moi@dmsimard.com","username":"dmsimard"},"change_message_id":"066f6fd9d30d2580a5453c907b54cb475144c006","unresolved":false,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"if MASS_HOSTING:"},{"line_number":255,"context_line":"    WSGI_APPLICATION \u003d \"ara.server.wsgi.application_masshosting\""},{"line_number":256,"context_line":"    DATABASES[\"default\"][\"ENGINE\"] \u003d \"ara.server.db_backend\""},{"line_number":257,"context_line":"    DATABASES[\"default\"][\"CONN_MAX_AGE\"] \u003d 0"},{"line_number":258,"context_line":"else:"},{"line_number":259,"context_line":"    WSGI_APPLICATION \u003d \"ara.server.wsgi.application\""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_b87bbcf2","line":256,"range":{"start_line":256,"start_character":38,"end_line":256,"end_character":59},"updated":"2019-06-14 13:29:14.000000000","message":"Can we pick a name that is more representative of what it does ?\nara.server.distributed_sqlite ?\nara.server.dynamic_sqlite ?","commit_id":"13306efb42acb800aada766e3abd5f653e719928"},{"author":{"_account_id":29199,"name":"Florian Apolloner","email":"florian@apolloner.eu","username":"apollo13"},"change_message_id":"49fae16985d27fe38edc195e13a340cdf873aff4","unresolved":false,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"if MASS_HOSTING:"},{"line_number":255,"context_line":"    WSGI_APPLICATION \u003d \"ara.server.wsgi.application_masshosting\""},{"line_number":256,"context_line":"    DATABASES[\"default\"][\"ENGINE\"] \u003d \"ara.server.db_backend\""},{"line_number":257,"context_line":"    DATABASES[\"default\"][\"CONN_MAX_AGE\"] \u003d 0"},{"line_number":258,"context_line":"else:"},{"line_number":259,"context_line":"    WSGI_APPLICATION \u003d \"ara.server.wsgi.application\""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_d3521313","line":256,"range":{"start_line":256,"start_character":38,"end_line":256,"end_character":59},"in_reply_to":"9fb8cfa7_b87bbcf2","updated":"2019-06-14 13:45:19.000000000","message":"Yes","commit_id":"13306efb42acb800aada766e3abd5f653e719928"},{"author":{"_account_id":9061,"name":"David Moreau Simard","email":"moi@dmsimard.com","username":"dmsimard"},"change_message_id":"066f6fd9d30d2580a5453c907b54cb475144c006","unresolved":false,"context_lines":[{"line_number":254,"context_line":"if MASS_HOSTING:"},{"line_number":255,"context_line":"    WSGI_APPLICATION \u003d \"ara.server.wsgi.application_masshosting\""},{"line_number":256,"context_line":"    DATABASES[\"default\"][\"ENGINE\"] \u003d \"ara.server.db_backend\""},{"line_number":257,"context_line":"    DATABASES[\"default\"][\"CONN_MAX_AGE\"] \u003d 0"},{"line_number":258,"context_line":"else:"},{"line_number":259,"context_line":"    WSGI_APPLICATION \u003d \"ara.server.wsgi.application\""},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_f874d4ff","line":257,"range":{"start_line":257,"start_character":26,"end_line":257,"end_character":38},"updated":"2019-06-14 13:29:14.000000000","message":"Can we add a comment to explain why this is relevant ?","commit_id":"13306efb42acb800aada766e3abd5f653e719928"},{"author":{"_account_id":29199,"name":"Florian Apolloner","email":"florian@apolloner.eu","username":"apollo13"},"change_message_id":"49fae16985d27fe38edc195e13a340cdf873aff4","unresolved":false,"context_lines":[{"line_number":254,"context_line":"if MASS_HOSTING:"},{"line_number":255,"context_line":"    WSGI_APPLICATION \u003d \"ara.server.wsgi.application_masshosting\""},{"line_number":256,"context_line":"    DATABASES[\"default\"][\"ENGINE\"] \u003d \"ara.server.db_backend\""},{"line_number":257,"context_line":"    DATABASES[\"default\"][\"CONN_MAX_AGE\"] \u003d 0"},{"line_number":258,"context_line":"else:"},{"line_number":259,"context_line":"    WSGI_APPLICATION \u003d \"ara.server.wsgi.application\""},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_533e23b8","line":257,"range":{"start_line":257,"start_character":26,"end_line":257,"end_character":38},"in_reply_to":"9fb8cfa7_f874d4ff","updated":"2019-06-14 13:45:19.000000000","message":"Feel free, it is needed because we need to open a __new__ connection every request to ensure that we can change the db per request.","commit_id":"13306efb42acb800aada766e3abd5f653e719928"}],"ara/server/wsgi.py":[{"author":{"_account_id":9061,"name":"David Moreau Simard","email":"moi@dmsimard.com","username":"dmsimard"},"change_message_id":"066f6fd9d30d2580a5453c907b54cb475144c006","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def application_masshosting(environ, start_response):"},{"line_number":39,"context_line":"    key \u003d \"/ara-report\""},{"line_number":40,"context_line":"    script_name \u003d environ[\"SCRIPT_NAME\"]"},{"line_number":41,"context_line":"    path_info \u003d environ[\"PATH_INFO\"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    from django.conf import settings"},{"line_number":44,"context_line":"    from ara.server.db_backend.base import local_storage"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_98def83b","line":41,"range":{"start_line":40,"start_character":0,"end_line":41,"end_character":36},"updated":"2019-06-14 13:29:14.000000000","message":"I ended up using this in my version:\n\n    from django.core.handlers.wsgi import get_path_info, get_script_name\n\n    script_name \u003d get_script_name(environ)\n    path_info \u003d get_path_info(environ)\n\nThere are some subtleties that these methods handle for us.","commit_id":"13306efb42acb800aada766e3abd5f653e719928"},{"author":{"_account_id":29199,"name":"Florian Apolloner","email":"florian@apolloner.eu","username":"apollo13"},"change_message_id":"49fae16985d27fe38edc195e13a340cdf873aff4","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def application_masshosting(environ, start_response):"},{"line_number":39,"context_line":"    key \u003d \"/ara-report\""},{"line_number":40,"context_line":"    script_name \u003d environ[\"SCRIPT_NAME\"]"},{"line_number":41,"context_line":"    path_info \u003d environ[\"PATH_INFO\"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    from django.conf import settings"},{"line_number":44,"context_line":"    from ara.server.db_backend.base import local_storage"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_336ccfcc","line":41,"range":{"start_line":40,"start_character":0,"end_line":41,"end_character":36},"in_reply_to":"9fb8cfa7_98def83b","updated":"2019-06-14 13:45:19.000000000","message":"By all means, I wanted the initial POC to be as easy to follow as possible.","commit_id":"13306efb42acb800aada766e3abd5f653e719928"}]}
