~dylanmccall/harvest/gsoc-client-stuff

« back to all changes in this revision

Viewing changes to harvest/opportunities/views.py

  • Committer: Dylan McCall
  • Date: 2010-07-12 17:40:56 UTC
  • mfrom: (180.2.10 harvest.581716)
  • Revision ID: dylanmccall@gmail.com-20100712174056-29ib7p6iz71h2snr
Merged from trunk. Note that there was some manual editing to templates and to settings.py.
The change from r189-190 was manually added to harvest/templates/opportunities/results.html and harvest/templates/opportunities/results_pkgdetails.html; the templates originally changed no longer exist here.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
def opportunity_detail(request, opportunity_id):
20
20
    return list_detail.object_detail(
21
21
        request,
22
 
        queryset = models.Opportunity.objects.all(),
 
22
        queryset = models.Opportunity.objects.filter(last_updated=opportunitylist__last_updated),
23
23
        object_id = opportunity_id,
24
24
        template_object_name = 'opportunity',
25
25
    )
62
62
 
63
63
 
64
64
def _create_packages_list(request, filters_pkg, filters_opp):
 
65
    # XXX: rockstar: Eep! We shouldn't be storing the None as a string.  We
 
66
    # should re-think this model relationship.
 
67
    #sourcepackages_list = models.SourcePackage.objects.exclude(name='None')
 
68
    
65
69
    sourcepackages_list = models.SourcePackage.objects.distinct()
66
70
    sourcepackages_list = filters_pkg.process_queryset(sourcepackages_list)
67
71
    
98
102
        context_instance=RequestContext(request))
99
103
 
100
104
 
101
 
#TODO: package_filter_detail(request, sourcepackage, opportunities_list)
102
 
 
103
 
 
104
105
def opportunities_results(request):
105
106
    filters = HarvestFilters()
106
107
    filters.update_from_http(request)
137
138
        'opportunities/results_pkgdetails.html',
138
139
        context,
139
140
        context_instance=RequestContext(request))
140