Add upload page
This commit is contained in:
parent
583a1ffce8
commit
727387566d
5 changed files with 185 additions and 33 deletions
22
photologue_custom/forms.py
Normal file
22
photologue_custom/forms.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue