Ejemplo n.º 1
0
def rpm_info_virtual(request, reponame, rpm):
    config = RepoConfigService()
    repoConfig = config.getConfig(reponame)
    rpm_path = os.path.join(config.getRepoDir(), repoConfig.destination[1:], rpm) 
    
    if '../' in rpm:
        raise Http404('../ not allowed')
    
    return rpm_info(rpm_path)
Ejemplo n.º 2
0
def rpm_info_virtual(request, reponame, rpm):
    config = RepoConfigService()
    repoConfig = config.getConfig(reponame)
    rpm_path = os.path.join(config.getRepoDir(), repoConfig.destination[1:],
                            rpm)

    if '../' in rpm:
        raise Http404('../ not allowed')

    return rpm_info(rpm_path)
Ejemplo n.º 3
0
def virtual_repo_info(request, reponame):
    config = RepoConfigService()
    repoConfig = config.getConfig(reponame)
    
    template = loader.select_template(['static/virtual_repo_info.html'])
    context = Context({
        'reponame' : reponame,
        'config' : repoConfig,
        'staticRepos' : config.staticRepos,
    })
    return HttpResponse(template.render(context))
Ejemplo n.º 4
0
def virtual_repo_info(request, reponame):
    config = RepoConfigService()
    repoConfig = config.getConfig(reponame)

    template = loader.select_template(['static/virtual_repo_info.html'])
    context = Context({
        'reponame': reponame,
        'config': repoConfig,
        'staticRepos': config.staticRepos,
    })
    return HttpResponse(template.render(context))