def recommendations(request, name):
    '\n    Get recommended packages for the repo\n\n    arguments:\n        :request: GET/POST HTTP request\n        :name: repo name\n\n    returns:\n        Rendered recommendation page\n    '
    repo_name = urllib.parse.unquote_plus(name)
    if (request.method == 'POST'):
        language = request.POST.get('language')
        language = language.lower()
        dependencies = request.POST.get('dependencies')
        dependencies = dependencies.strip(',')
        if (language not in SUPPORTED_LANGUAGES.keys()):
            return HttpResponse(f'Demo language {language} not supported', status=404)
        request.session['dependencies'] = dependencies
        request.session['language'] = language
        branch_name = None
        branch_names = None
    else:
        if (not request.session.get('github_token')):
            return HttpResponseRedirect(reverse('index'))
        branch_name = request.GET.get('branch', default='master')
        (_, branch_names, language) = github_util.get_dependencies(request.session['github_token'], repo_name, branch_name)
    return render(request, 'webservice/recommendations.html', {'repository_name': repo_name, 'recommendation_url': f'/recommendations/{urllib.parse.quote_plus(name)}?branch={branch_name}', 'branch_names': branch_names, 'current_branch': branch_name, 'language': language})
Get recommended packages for the repo

arguments:
    :request: GET/POST HTTP request
    :name: repo name

returns:
    Rendered recommendation page
def recommendations(request, name):
    '\n    Get recommended packages for the repo\n\n    arguments:\n        :request: GET/POST HTTP request\n        :name: repo name\n\n    returns:\n        Rendered recommendation page\n    '
    repo_name = urllib.parse.unquote_plus(name)
    if (request.method == 'POST'):
        language = request.POST.get('language')
        language = language.lower()
        dependencies = request.POST.get('dependencies')
        dependencies = dependencies.strip(',')
        if (language not in SUPPORTED_LANGUAGES.keys()):
            return HttpResponse(f'Demo language {language} not supported', status=404)
        request.session['dependencies'] = dependencies
        request.session['language'] = language
        branch_name = None
        branch_names = None
    else:
        if (not request.session.get('github_token')):
            return HttpResponseRedirect(reverse('index'))
        branch_name = request.GET.get('branch', default='master')
        (_, branch_names, language) = github_util.get_dependencies(request.session['github_token'], repo_name, branch_name)
    return render(request, 'webservice/recommendations.html', {'repository_name': repo_name, 'recommendation_url': f'/recommendations/{urllib.parse.quote_plus(name)}?branch={branch_name}', 'branch_names': branch_names, 'current_branch': branch_name, 'language': language})