lp:~dylanmccall/harvest/harvest-dylan-m
- Get this branch:
- bzr branch lp:~dylanmccall/harvest/harvest-dylan-m
Branch merges
- Daniel Holbach: Approve
- James Westby: Approve
-
Diff: 806 lines (+706/-1)11 files modifiedINSTALL (+1/-1)
harvest/common/url_tools.py (+32/-0)
harvest/filters/__init__.py (+23/-0)
harvest/filters/containers.py (+97/-0)
harvest/filters/filters.py (+318/-0)
harvest/opportunities/filters.py (+53/-0)
harvest/opportunities/urls.py (+4/-0)
harvest/opportunities/views.py (+34/-0)
harvest/opportunities/wrappers.py (+90/-0)
harvest/settings.py (+4/-0)
harvest/templates/opportunities/opportunities_filter.html (+50/-0)
Branch information
Recent revisions
- 202. By Dylan McCall
-
Fixed a bug where serialize_value, given an empty set for value, used the current value instead.
- 201. By Dylan McCall
-
Cleanup, as discussed at <https:/
/code.edge. launchpad. net/~dylanmccal l/harvest/ harvest- dylan-m/ +merge/ 28262> Added newlines at end of files, where they were missing.
harvest/filters:
Finished docstrings
Removing "#abstract" comment where it makes no senseharvest/
filters/ containers. py:
Renamed some methods for clarityharvest/
filters/ filters. py:
raising exception for methods that need to be implemented
Rejigged get_values, get_value_string and get_parameters_for_value. Now a filter can be serialized and it's all a little bit simpler - 200. By Dylan McCall
-
Tinkering with QuerySet stuff for performance.
opportunities_list QuerySet is filtered by selected packages in all cases again. (Filter added when it is first created in views.py).
Filtering alone (not counting display of package info) is down to 4 SQL queries total in all cases; one database hit for each model. Still feels heavy and needs some tuning, but it is balanced. Biggest possible query still takes 5 seconds of CPU time, but it no longer kills the server.
- 199. By Dylan McCall
-
Slightly closer to working opportunities_
filter template stuff.
Opportunities are listed for one package at a time.Added PackageWrapper and PackageListWrapper, which provide information to templates for listing packages and their opportunities.
(Hopefully in an optimized fashion in the future)url_tools has a new current_
url_with_ parameters function, so we can add parameters to the query string in one line. Removed some debug text.
Default parameters for HarvestFilters no longer remove all opportunities.
- 198. By Dylan McCall
-
Default parameters for FilterSystem. Going to /opportunities/
filter now does something (reasonably) sane. url_with_parameters split to its own file in common, since it will be used in a template tag as well. Now supports parameters without values.
- 197. By Dylan McCall
-
Implemented basic filters on left side of mockup.
Filters by package, then by opportunities within those packages. The latter is not (yet) reflected in the template, pending further work.
Yet more tidying of filtering system.
FilterGroup and ChoiceFilter slightly realigned. Duplicated code should now be purely coincidental; the two do not semantically fit as descendants, but as eerily similar siblings.
Instance variables no longer defined on a class level, but within each instance's init method
Obsessively placed calls to parent class init methods within each subclass's init method.OppListFilter and PkgSetFilter can now filter by primary key instead of name field. SQL query time appears to be more than halved.
- 196. By Dylan McCall
-
Kind of ugly (but functioning!) generation of urls for filters.
Many FIXMEs :)
Cleaned up scope and flow of dependencies. Much less redundancy where it is semantically improper, although FilterGroup remains an offender.
- 195. By Dylan McCall
-
Organized filters_base.py into its own module
Split containers and filters.
Renamed Filter.parent to Filter.container to clarify scope.
- 194. By Dylan McCall
-
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.
- 193. By Dylan McCall
-
Basic functionality for a filter to access the root FilterSystem object
Cleanup for FilterSystem. (The code under filters.py feels a bit more sensible).
Split Filter.render and Filter.render_html
New Filter.get_value function
Improved docstrings
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:harvest