~dylanmccall/harvest/gsoc-client-stuff

« back to all changes in this revision

Viewing changes to harvest/opportunities/filters.py

  • Committer: Dylan McCall
  • Date: 2010-06-11 03:06:36 UTC
  • Revision ID: dylanmccall@gmail.com-20100611030636-uapdngjaby6iuodj
First test of filter URLs. Any filter inside a group that does enabling / disabling can get a URL that toggles it.

New comments in filters_base.py identify which methods should be considered final, and which ones should be considered abstract.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
class PkgNameFilter(EditFilter):
5
5
    def process_queryset(self, queryset):
6
 
        return queryset.filter(name__startswith = self.value)
 
6
        return queryset.filter(name__startswith = self.get_value())
7
7
 
8
8
class PkgSetFilter(ChoiceFilter):
9
9
    def initialize(self):
12
12
    
13
13
    def process_queryset(self, queryset):
14
14
        #FIXME: getting packageset by included name is punishable by death
15
 
        return queryset.filter(packagesets__name__in=self.selected_set)
 
15
        return queryset.filter(packagesets__name__in=self.get_value())
16
16
 
17
17
 
18
18