feat: add upload and delete option for releases

This commit is contained in:
mohamad
2026-05-31 13:50:55 +03:30
parent de2789bd99
commit 76185c7434
13 changed files with 475 additions and 19 deletions
+12 -1
View File
@@ -55,6 +55,7 @@ class SubProductVersionInline(admin.TabularInline):
extra = 0
ordering = ("order", "version")
fields = RELEASE_VERSION_INLINE_FIELDS
show_change_link = True
class MainProductVersionInline(admin.TabularInline):
@@ -63,6 +64,7 @@ class MainProductVersionInline(admin.TabularInline):
extra = 0
ordering = ("order", "version")
fields = RELEASE_VERSION_INLINE_FIELDS
show_change_link = True
class SubProductInline(admin.StackedInline):
@@ -208,12 +210,21 @@ class SubProductVersionAdmin(admin.ModelAdmin):
(
"Installable downloads",
{
"description": (
"For each platform, set an external URL, upload a file, both, or neither. "
"When a URL is set it is used on the site; otherwise an uploaded file is served. "
"To delete an uploaded file from the server, open this release, check Clear next to the file, and Save."
),
"fields": (
"windows_download_url",
"windows_download_file",
"macos_download_url",
"macos_download_file",
"linux_download_url",
"linux_download_file",
"source_code_url",
)
"source_code_file",
),
},
),
("Package link", {"fields": ("package_resource_url",)}),