def homepage(request): template_data = {} debug_logger.debug("User id: {0}".format(request.user.id)) if not request.user.is_authenticated(): # We need to create an auth URL for non authenticated users. They will see an "Install on Glass" button. template_data['auth_url'] = oauth_utils.get_auth_url(request, client_secrets_filename=client_secrets_filename, redirect_uri=settings.GOOGLE_REDIRECT_URI) return render_to_response('home.html', template_data, context_instance=RequestContext(request))
def homepage(request): """ Decide where to send user based on whether they are logged in or not. """ template_data = {} logger.debug("User id: {0}".format(request.user.username)) if not request.user.is_authenticated(): template_data['auth_url'] = oauth_utils.get_auth_url(request, client_secrets_filename=client_secrets_filename, redirect_uri=settings.GOOGLE_REDIRECT_URI) return render_to_response('landing.html', template_data, context_instance=RequestContext(request)) return dashboard(request)