feat: add client release force update flag
This commit is contained in:
@@ -9,11 +9,12 @@ class DownloadReleaseAdmin(admin.ModelAdmin):
|
||||
"platform",
|
||||
"version",
|
||||
"is_current",
|
||||
"force_update",
|
||||
"download_source",
|
||||
"sha256_short",
|
||||
"updated_at",
|
||||
)
|
||||
list_filter = ("platform", "is_current")
|
||||
list_filter = ("platform", "is_current", "force_update")
|
||||
search_fields = ("version", "sha256", "external_url", "file")
|
||||
readonly_fields = ("created_at", "updated_at")
|
||||
fieldsets = (
|
||||
@@ -24,6 +25,7 @@ class DownloadReleaseAdmin(admin.ModelAdmin):
|
||||
"platform",
|
||||
"version",
|
||||
"is_current",
|
||||
"force_update",
|
||||
"release_notes",
|
||||
)
|
||||
},
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.15 on 2026-07-08 07:21
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('portal', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='downloadrelease',
|
||||
name='force_update',
|
||||
field=models.BooleanField(default=False, verbose_name='强制更新'),
|
||||
),
|
||||
]
|
||||
@@ -25,6 +25,7 @@ class DownloadRelease(models.Model):
|
||||
],
|
||||
)
|
||||
is_current = models.BooleanField("当前版本", default=False)
|
||||
force_update = models.BooleanField("强制更新", default=False)
|
||||
release_notes = models.TextField("发布说明", blank=True)
|
||||
created_at = models.DateTimeField("创建时间", auto_now_add=True)
|
||||
updated_at = models.DateTimeField("更新时间", auto_now=True)
|
||||
|
||||
Reference in New Issue
Block a user