Merge "Fix the problem that horizon launch fails due to python3-django upgrade"
This commit is contained in:
commit
8121f7d24d
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from django.forms import FileInput
|
||||||
from django.urls import reverse # noqa
|
from django.urls import reverse # noqa
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
@ -17,10 +18,14 @@ from starlingx_dashboard import api as stx_api
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class MultipleFileInput(FileInput):
|
||||||
|
allow_multiple_selected = True
|
||||||
|
|
||||||
|
|
||||||
class UploadPatchForm(forms.SelfHandlingForm):
|
class UploadPatchForm(forms.SelfHandlingForm):
|
||||||
failure_url = 'horizon:admin:software_management:index'
|
failure_url = 'horizon:admin:software_management:index'
|
||||||
patch_files = forms.FileField(label=_("Patch File(s)"),
|
patch_files = forms.FileField(label=_("Patch File(s)"),
|
||||||
widget=forms.FileInput(attrs={
|
widget=MultipleFileInput(attrs={
|
||||||
'data-source-file': _('Patch File(s)'),
|
'data-source-file': _('Patch File(s)'),
|
||||||
'multiple': "multiple"}),
|
'multiple': "multiple"}),
|
||||||
required=True)
|
required=True)
|
||||||
|
|
Loading…
Reference in New Issue