comparison gpp/downloads/forms.py @ 241:27bee3ac85e6

For #93: fix url scheme for downloads.
author Brian Neal <bgneal@gmail.com>
date Wed, 15 Sep 2010 01:01:40 +0000
parents b4305e18d3af
children 88b2b9cb8c1f
comparison
equal deleted inserted replaced
240:1246a4f1ab4f 241:27bee3ac85e6
6 from django import forms 6 from django import forms
7 from django.conf import settings 7 from django.conf import settings
8 8
9 from downloads.models import PendingDownload 9 from downloads.models import PendingDownload
10 from downloads.models import AllowedExtension 10 from downloads.models import AllowedExtension
11
12
13 class SearchForm(forms.Form):
14 """Downloads search form."""
15 text = forms.CharField(max_length=30)
16
17 def query(self):
18 return self.cleaned_data['text']
19 11
20 12
21 class AddDownloadForm(forms.ModelForm): 13 class AddDownloadForm(forms.ModelForm):
22 """Form to allow adding downloads.""" 14 """Form to allow adding downloads."""
23 title = forms.CharField(required=True, 15 title = forms.CharField(required=True,