Merge lp:~stevenk/launchpad/dsp-vocab into lp:launchpad
Proposed by
Steve Kowalik
Status: | Merged |
---|---|
Approved by: | Steve Kowalik |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13298 |
Proposed branch: | lp:~stevenk/launchpad/dsp-vocab |
Merge into: | lp:launchpad |
Diff against target: |
277 lines (+243/-0) 2 files modified
lib/lp/registry/tests/test_dsp_vocabularies.py (+144/-0) lib/lp/registry/vocabularies.py (+99/-0) |
To merge this branch: | bzr merge lp:~stevenk/launchpad/dsp-vocab |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Ian Booth (community) | Needs Information | ||
Review via email: mp+65762@code.launchpad.net |
Commit message
[r=jtv][bug=42298][incr] Add DistributionSou
Description of the change
Add a new vocab for DistributionSou
To post a comment you must log in.
Some initial thoughts:
The toTerm() implementation looks wrong I think. toTerm() takes 3 parameters: obj, token, title. IIRC obj should be the data item represented by the Term and is what your business logic in the form submission callback gets, in this case dsp. I think(?) you want something like:
SimpleTerm(dsp, %s-%s' % (dsp.distributi on.name, dsp.name), 'xxxx') where xxxx is whatever user text you want displayed in the ui.
It appears there's scope for the toTerm to execute sql in getting the data it needs. Have you profiled it? Perhaps there's a need to prefetch/eager load the built binaries info.