X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/38343a3fc11f5509c8522fec94c0ae7085b7244f..c1ed3c489fb1dc4e433e394b68fcfd5ac4e49246:/apps/explorer/forms.py?ds=inline diff --git a/apps/explorer/forms.py b/apps/explorer/forms.py index 065a8153..edb7ea6c 100644 --- a/apps/explorer/forms.py +++ b/apps/explorer/forms.py @@ -1,6 +1,17 @@ from django import forms +from explorer import models + class BookForm(forms.Form): text = forms.CharField(widget=forms.Textarea) + commit_message = forms.CharField() + user = forms.CharField() + +class ImageFoldersForm(forms.Form): + folders = forms.ChoiceField(required=False) + def __init__(self, *args, **kwargs): + super(ImageFoldersForm, self).__init__(*args, **kwargs) + self.fields['folders'].choices = [('', '-- Wybierz folder z obrazkami --')] + [(fn, fn) for fn in models.get_image_folders()] +