Dodanie katalogów files i media do .gitignore.
[redakcja.git] / apps / explorer / forms.py
1 from django import forms
2
3 from explorer import models
4
5
6 class BookForm(forms.Form):
7     text = forms.CharField(widget=forms.Textarea)
8     commit_message = forms.CharField()
9     user = forms.CharField()
10     
11
12 class ImageFoldersForm(forms.Form):
13     folders = forms.ChoiceField(required=False)
14     
15     def __init__(self, *args, **kwargs):
16         super(ImageFoldersForm, self).__init__(*args, **kwargs)
17         self.fields['folders'].choices = [('', '-- Wybierz folder z obrazkami --')] + [(fn, fn) for fn in models.get_image_folders()]
18