Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pulp_python/app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,25 +540,25 @@ def find_artifact():
}


def write_simple_index(project_names, streamed=False):
def write_simple_index(project_names):
"""Writes the simple index."""
simple = Template(simple_index_template)
context = {
"SIMPLE_API_VERSION": SIMPLE_API_VERSION,
"projects": ((x, canonicalize_name(x)) for x in project_names),
}
return simple.stream(**context) if streamed else simple.render(**context)
return simple.render(**context)


def write_simple_detail(project_name, project_packages, streamed=False):
def write_simple_detail(project_name, project_packages):
"""Writes the simple detail page of a package."""
detail = Template(simple_detail_template, autoescape=True)
context = {
"SIMPLE_API_VERSION": SIMPLE_API_VERSION,
"project_name": project_name,
"project_packages": project_packages,
}
return detail.stream(**context) if streamed else detail.render(**context)
return detail.render(**context)


def write_simple_index_json(project_names):
Expand Down