2
2
from django .utils import timezone
3
3
from leaflet .forms .widgets import LeafletWidget
4
4
5
- from geospaas .catalog .models import Source
6
-
7
5
8
6
class BaseSearchForm (forms .Form ):
9
7
""" Basic version of form for basic seaching of django-geospaas metadata """
@@ -20,8 +18,6 @@ class BaseSearchForm(forms.Form):
20
18
time_coverage_start = forms .DateTimeField (
21
19
initial = timezone .datetime (2000 , 1 , 1 , tzinfo = timezone .utc ))
22
20
time_coverage_end = forms .DateTimeField (initial = timezone .now ())
23
- source = forms .ModelMultipleChoiceField (
24
- Source .objects .all (), required = False )
25
21
26
22
def filter (self , ds ):
27
23
""" Filtering method of the form. All filtering processes are coded here """
@@ -34,12 +30,6 @@ def filter(self, ds):
34
30
# Too late datasets are excluded from the filtering results
35
31
ds = ds .exclude (time_coverage_start__gt = t_1 )
36
32
37
- src = self .cleaned_data .get ('source' , None )
38
- # Just the one(s) with correct selected source should pass the filtering actions
39
- # if Source is given in the input form
40
- if src :
41
- ds = ds .filter (source__in = src )
42
-
43
33
# spatial filtering
44
34
if self .cleaned_data ['polygon' ]:
45
35
# filtering by user provided polygon
0 commit comments