def get_extra_packages(self): extra_packages = [] release = self.build_kwargs.get("release") if release: r = Releases() extra_packages.append(r.get_requested_version(release)) return extra_packages
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) release_field = self.fields["release"] if self.update_for: release_field.widget = forms.HiddenInput() else: choices = [] if not self.standalone: choices.append(("", "Do not include santa")) # TODO: Async or cached to not slow down the web page r = Releases() for filename, version, created_at, download_url, is_local in r.get_versions( ): choices.append((filename, filename)) release_field.choices = choices