diff --git a/tunictracker/tracker/views.py b/tunictracker/tracker/views.py index 0112e71..f2e02a4 100644 --- a/tunictracker/tracker/views.py +++ b/tunictracker/tracker/views.py @@ -22,8 +22,6 @@ defaults = { def session_key(session, key): if key not in session.keys(): session[key] = defaults[key] - if key == 'backend_filepath': - session['backend_filepath_updated'] = True # TODO: consider serializing user sessions for debugging in the future. logging.info( @@ -107,7 +105,8 @@ def index(request): def get_address(request): if request.method == 'GET': - return HttpResponse(dumps({'listen_address': request.session['listen_address'], 'backend_filepath_update': request.session['backend_filepath_updated']}), content_type="application/json") + session_key(request.session, 'backend_filepath_updated') + return HttpResponse(dumps({'listen_address': request.session['listen_address'], 'backend_filepath_updated': request.session['backend_filepath_updated']}), content_type="application/json") else: return render(request, 'tracker/index.html') diff --git a/tunictracker/tunictracker/settings.py b/tunictracker/tunictracker/settings.py index 4cc6738..9249b10 100644 --- a/tunictracker/tunictracker/settings.py +++ b/tunictracker/tunictracker/settings.py @@ -23,11 +23,12 @@ BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-ae-fwu3z$wexeiac4ggt0l@x1*uq5v9-q&$y#frf85xli)bo8f' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False ALLOWED_HOSTS = [ "localhost", - "127.0.0.1" + "127.0.0.1", + "tunic.werefox.cafe" ]