def home_view(request):
    user_count = User.objects.all().exclude(username='worker_process').count()
    if (user_count == 0):
        return HttpResponseRedirect('/first-run/')
    elif (config.CHANNEL == ''):
        return HttpResponseRedirect('/set-channel/')
    elif config.SCOPE_UPDATED_NEEDED:
        return HttpResponseRedirect('/refresh-token-scope/')
    else:
        return HttpResponseRedirect('/dashboard')
def home_view(request):
    user_count = User.objects.all().exclude(username='worker_process').count()
    if (user_count == 0):
        return HttpResponseRedirect('/first-run/')
    elif (config.CHANNEL == ):
        return HttpResponseRedirect('/set-channel/')
    elif config.SCOPE_UPDATED_NEEDED:
        return HttpResponseRedirect('/refresh-token-scope/')
    else:
        return HttpResponseRedirect('/dashboard')