working UGC content upload with multi-upload support

This commit is contained in:
JakeBreath
2026-08-03 21:05:12 -05:00
parent 473b3c811b
commit 87b0d46232
18 changed files with 563 additions and 490 deletions
-9
View File
@@ -21,7 +21,6 @@ class ProjectForm(forms.Form):
'placeholder': 'Write the description in Markdown…',
}),
)
thumbnail = forms.ImageField(required=False)
caption = forms.CharField(
max_length=128,
required=False,
@@ -35,19 +34,11 @@ class ProjectForm(forms.Form):
class VersionForm(forms.Form):
def __init__(self, *args, required_file=True, **kwargs):
# The create flow uploads the version file out-of-band (temp upload),
# so there the `file` field is optional in the bound form.
super().__init__(*args, **kwargs)
if not required_file:
self.fields['file'].required = False
version_name = forms.CharField(
max_length=64,
label='Version',
widget=forms.TextInput(attrs={'placeholder': 'e.g. 1.0.0'}),
)
file = forms.FileField(label='File')
changelog = forms.CharField(
required=False,
widget=forms.Textarea(attrs={