diff options
author | 2019-07-08 14:36:23 +0000 | |
---|---|---|
committer | 2019-07-08 14:36:23 +0000 | |
commit | 35c8640a32b7c6b3b35d68367668898fdfd7d423 (patch) | |
tree | 17e3c1e5ac3812e310da3c71195aca1f5096749c /src/dashboard/views.py | |
parent | 42088a2387cf82d666ec23b8671d55d2b27d5c1f (diff) | |
parent | bf45f8f4d05d9842b285013cfcb0a0235ce51c5d (diff) |
Merge "Hacking on AJAX"
Diffstat (limited to 'src/dashboard/views.py')
-rw-r--r-- | src/dashboard/views.py | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/src/dashboard/views.py b/src/dashboard/views.py index aaad7ab..9416cb4 100644 --- a/src/dashboard/views.py +++ b/src/dashboard/views.py @@ -63,36 +63,15 @@ def host_profile_detail_view(request): def landing_view(request): - manager = None - manager_detected = False - if 'manager_session' in request.session: - - try: - manager = ManagerTracker.managers[request.session['manager_session']] - - except KeyError: - pass - - if manager is not None: - # no manager detected, don't display continue button - manager_detected = True - - if request.method == 'GET': - return render(request, 'dashboard/landing.html', {'manager': manager_detected, 'title': "Welcome to the Lab as a Service Dashboard"}) - - if request.method == 'POST': - try: - create = request.POST['create'] - - if manager is not None: - del manager - - mgr_uuid = create_session(create, request=request,) - request.session['manager_session'] = mgr_uuid - return HttpResponseRedirect('/wf/') - - except KeyError: - pass + manager = ManagerTracker.managers.get(request.session.get('manager_session')) + return render( + request, + 'dashboard/landing.html', + { + 'manager': manager is not None, + 'title': "Welcome to the Lab as a Service Dashboard" + } + ) class LandingView(TemplateView): |