22 lines
688 B
Python
22 lines
688 B
Python
from django import forms
|
|
from django.utils.translation import gettext_lazy as _
|
|
from photologue.models import Gallery
|
|
|
|
|
|
class UploadForm(forms.Form):
|
|
file_field = forms.FileField(
|
|
label="",
|
|
widget=forms.ClearableFileInput(attrs={'multiple': True}),
|
|
)
|
|
gallery = forms.ModelChoiceField(
|
|
Gallery.objects.all(),
|
|
label=_('Gallery'),
|
|
required=False,
|
|
help_text=_('Select a gallery to add these images to. Leave this empty to '
|
|
'create a new gallery from the supplied title.')
|
|
)
|
|
new_gallery_title = forms.CharField(
|
|
label=_('New gallery title'),
|
|
max_length=250,
|
|
required=False,
|
|
)
|