2
Wie ein ‚multiple‘ Attribut zur Eingabe in django Modelform hinzufügen, um dies zu erhalten:Wie füge ich ein 'multiple' Attribut zu inputtyp = 'file' in django modelForm hinzu?
<input id="id_photo_path" name="photo_path" type="file" multiple />.
Ist es möglich? Soll ich widget
wie folgt verwenden:
class CommentForm(forms.ModelForm):
class Meta:
model = Comment
fields = ('text',)
widgets = {
'text': forms.Textarea(attrs={'class': 'form-control', 'rows': 3 }),
}